Hi Davide,

the first thing you have to know is how topics work. ActiveMQ has a nice article about it:
http://activemq.apache.org/how-does-a-queue-compare-to-a-topic.html
So this means you do not have to delete from the topic. It automatically sends to all listeners.

If you have not yet worked with JMS at all you should first use the JMS API directly so you get an idea how things work behind the scenes.

When you start with CXF on JMS you will have to use the JMS Transport.
http://cwiki.apache.org/CXF20DOC/jms-transport.html

There is a nice example in the CXF distribution for you case in samples/jms_pubsub.

Basically it works this way:

- To send out the event you use the client for the service and call the service with the event as parameter - Each app that wants to receive the event has to "offer" the service. So they listen on the topic and get called
when the event is sent

There is one other thing you have to remember. A topic send only to those listeners that are currently waiting. So if one listener is down it will miss events. If you want to make sure it receives all events when it comes up again you have to use a feature called
durable subscription.
http://www.enterpriseintegrationpatterns.com/DurableSubscription.html
http://www.novell.com/documentation/extend52/Docs/help/MP/jms/tutorial/durable-1.htm

I hope that I could help a bit.

Greetings

Christian

Davide Gesino schrieb:
Hi,

this is a technical question not only involving CXF.
In my CXF+JMS app I have some messages that are to be delivered in a
asynchronous fashion from a source to multiple listeners.
This events represents alarms situations in my application... these
asynchronous events are sent to multiple destination, so the rationale would
be an asynchronous delivery to multiple receivers, so I would put these
messages in a JMS "topic" (or more topics).
I would create these topic on Active MQ provider and send the alarms as long
as the occur.

My questions are:

1) what do I have to set up on the client side? I would register some listeners to the topic: there's some easy way to
recover the SOAP message from the JMS API or there is already some CXF API
that shadows the JMS low level API (TextMessage and so on) ??
I'm missing the point between low level message in JMS world and higher
level vision in the CXF-SOAP world.

2) how delete from the topic the message after it has been consumed by the
last registered listener (more a JMS question)




Reply via email to