Sample code to send JMS message to Luminis

Does anyone have some sample code you could share that sends a message to Luminis (LMB) using JMS?

We'd like to be able to add users and groups to Luminis so we want to send it messages telling to do that. We're just new to JMS, so it is hard to figure out what connection parameters go where.

Any sample code you could provide would be appreciated.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Sample code for you!

I don't think I can upload an attachment to a topic that I didn't create, so I'll host the attachment on our server:

http://paws.usask.ca/customizations/xltranslate.zip

Inside you'll find both perl and java code, and a picture of what's happening. Here's a brief description:

1. The flow of messages is changed from default:
- the custom JMS subscriber is started up, and is listening on topic UofS_sis_Sync
- the custom JMS publisher will publish on topic com_sct_ldi_sis_sync
- we have reconfigured our LMG to publish on topic UofS_sis_Sync
- the stock Luminis subscriber is listening on topic com_sct_ldi_sis_sync

2. When LMG publishes new messages, they are picked up by our crosslist subscriber, sent to the translator for re-writing, and then re-published (see the diagram)

3. The Luminis subscriber happily consumes the re-written messages, unaware that they've been altered

Since you're interested in publishing your own messages, you can likely disregard the perl portion completely, I've included it for anyone else interested in how we translated the XML messages.

One more thing you'll have to do in order to talk with the message broker is to set up your produce and subscribe permissions within the broker itself, using mbtool. For example, to allow "mynewuser" to publish messages that will be picked up by the Luminis subscriber:

mbtool add user -id=mynewuser -desc=mynewuser -credential=newpassword

mbtool update clientaccess -policy=allow -entity=user -id=mynewuser -conn=normal -op=add

mbtool update destaccess -policy=allow -entity=user -id=mynewuser -access=produce -dest=com_sct_ldi_sis_sync -type=topic -op=add

Todd

Getting Luminis to consume messages from LMB

Thanks for your code, that helped me write a class that can send messages to LMB.

Do you have any information about how to make Luminis subscribe to messages sent to the com_sct_ldi_sis_Sync topic? There is some information in the Luminis Message Broker Installation and Administration Guide that talks about properties that need to be set in Luminis' directory. On our test machine those seem to be set, but Luminis isn't receiving messages - it isn't set up to consume messages from com_sct_ldi_sis_Sync.

Is there a particular user that I should set as a consumer for com_sct_ldi_sis_Sync that will make Luminis read from the topic?

Setting

Check this setting, it should be set to true:

configman -s messaging.datapipeline.client.cp\$cpincoming.enabled true

xml commands

HI, I also am interested in sending command to luminis subscriber. I got the sample code working, rather a modified version that publishes messages to a subscriber. Now I need to know how to send messages to Luminis Subscriber so it will do things like add new user account, etc. Do I just send xml messages that are generated with pipeline-user-2.dtd ?? How are you guys doing this?

Thanks.

Yes

Yes, you just send messages on the normal topic that Luminis is listening on, and it will pick up those messages. You can watch your log file to see what a normal XML message looks like. Yes, you can then add/remove users, add/remove enrollments, etc.

Todd

Syndicate content