You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Tomasz Prus <to...@gmail.com> on 2008/11/21 08:21:13 UTC

jms client example

hi,

can anyone help me and paste jms client (producer and consumer)
example with pooling? I have problem with this:

user1 sends request and waits for response
user2 sends request and waits for response

and sometimes user1 consumes messages that should be for user2 and vice versa

Best regards,
Tomasz Prus

Re: jms client example

Posted by Ashwin Karpe <as...@progress.com>.
Jeff,

It should be possible to do with queues as well. The key is for the JMS
producers to tie up with the same "Reply To" queues which are usually
created as temp queues by the Servicemix JMS Component. However this could
be changed by setting a property on the JMS Producer/Consumer.

This will then cause contention between tht 2 JMS Producers and cause
messages to be pulled out of order in the absence of a correlation ID.

- Ashwin...

On Thu, Nov 20, 2008 at 11:21 PM, Tomasz Prus <to...@gmail.com> wrote:
> hi,
>
> can anyone help me and paste jms client (producer and consumer)
> example with pooling? I have problem with this:
>
> user1 sends request and waits for response
> user2 sends request and waits for response
>
> and sometimes user1 consumes messages that should be for user2 and vice
> versa
>
> Best regards,
> Tomasz Prus
>




-----
--- 
Ashwin Karpe, Principal Consultant, PS - Opensource Center of Competence 
Progress Software Corporation
14 Oak Park Drive
Bedford, MA 01730
--- 
+1-972-304-9084 (Office) 
+1-972-971-1700 (Mobile) 
---- 
Blog: http://opensourceknowledge.blogspot.com/


-- 
View this message in context: http://www.nabble.com/jms-client-example-tp20616319p20646595.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: jms client example

Posted by Jeff Peterson <j....@gmail.com>.
Tomasz,

I think your problem is that you are using a Queue.  Instead, try using a Topic

When using a topic, all clients receive all messages published to the
Topic.  It will be up to the client to ignore messages which are not
meant for it.

- Jeff

On Thu, Nov 20, 2008 at 11:21 PM, Tomasz Prus <to...@gmail.com> wrote:
> hi,
>
> can anyone help me and paste jms client (producer and consumer)
> example with pooling? I have problem with this:
>
> user1 sends request and waits for response
> user2 sends request and waits for response
>
> and sometimes user1 consumes messages that should be for user2 and vice versa
>
> Best regards,
> Tomasz Prus
>