cancel
Showing results for 
Search instead for 
Did you mean: 

JMS if you please

Former Member
0 Kudos

I have a scenario where I have two different messages sent into one q from an external system.

Now in XI I am going to receiver these 2 messages via the JMS sender adapter.

The issue is that this is a JMS to File scenario and each of these two messages has to be named differently.

You may say variable substitution but I am going to attempt to just route the message through with no transformation similarly to the way we do it with a file. So that means i cannot access the payload as such in the pipeline.

So my quest is to find some way of either using some sort of message attribute (file Name) to make this happen but since i cannot see away to get the original file name from MQ Series I am doubtful about this approach.

This leaves me with the following option:

1: I would like to use the JMS Selecter field to differentiate between the two message and hence will use two different sender agreement, comm channels and receiver agreements to achieve my goal. But I would like some confirmation on whether this approach will work. - to have two separate comm channels connected to the smae Queue in MQ Series but receive different messages based on the message selector?

Can someone shed some light on whther this is possible?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Does anyone have any experience with JMS?

Former Member
0 Kudos

Ok lets make this easier....

<b>Is it possible to have separate comm channels pointing to the same message Queue on MQ Series?</b>

If I know the answer to that then I know whether this solution can work...

stefan_grube
Active Contributor
0 Kudos

No, this is not possible.

The JMS takes any message in the queue, you cannot filter the messages in any way.

Regards

Stefan

Former Member
0 Kudos

ok then what is the point of the message selector?

I thought that was exactly the point... that you could determine which messages were picked up by which adapter

<b>You use the JMS message selector to specify conditions that a JMS message in the specified JMS queue must meet in order to be processed by the sender adapter.</b>

From sap help... so the only remaining questions is... is the above statement true and if so then can you have multiple comm channels with different conditions poiting to the same queue?

Stefan is your answer still the same?

Message was edited by:

Alex

Former Member
0 Kudos

No why 2 communication channel is required?? both will pic the all messages from the Q...so one is sufficient.

Tell me what is the correct requirement??

I got that you have to read the JMS Q and it has to diff messages..but what is end to end scenario?

Thanks

Farooq.

Former Member
0 Kudos

because they are different receivers and because I am not going to convert to xml i have to determine the receives based on the sended interface.... so to do this I need to separate the messages.

Hence one queue contains two message interfaces...

So tell me if both interfaces have different structures then how can I use one comm channel?

Additionally you didn't read the above statement.. I am trying to determine whther the message selector will eliminate the issue of one comm channel picking up all messages..

Message was edited by:

Alex

stefan_grube
Active Contributor
0 Kudos

You are right, you can use the message selector to distinguish between messages and so you can use different communication channels, but:

"A JMS message selector allows a client to specify, by header field references and property references, the messages it is interested in. Only messages whose header and property values match the selector are delivered.

<b>Message selectors cannot reference message body values</b>."

http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/jms/Message.html

Can you provider header or property information to the message?

Regards

Stefan

Former Member
0 Kudos

That is my next task to find out what is in the Message Header or Property...

My first main concern was to make sure that we could have multiple Comm channels picking up different messages from the same queue...

I will let you all know if my solution is a realistic one or not once tested