Hi Lukasz,
>>> how are you going to verify that target service received the message?
>>> based on the fact that there was no exception?
Yes, if the exchange is returned with a Done status. This is true for an
In-Only exchange as well (no need for explicit Robust In-Only). If the
payload is received by a JMS Provider that drops the contents of an ME on a
queue, it sets Done on the Exchange. This changes the direction of the
exchange and it is received in the previous component. Obviously, the
previous component (in this case an SMX Bean returning the stock response to
the client) has to be looking for it. If it gets a done, then it can safely
assume that the message was dropped on the queue. If the exchange has a
fault then it is due to an unreachable component. There will be no Error on
the exchange due to the fact that the JMS Consumer does not throw business
level exceptions.
The more straightforward solution could be the following
CXF-BC --> SMX-Bean --> JMS-P --> JMS-C --> Pipeline <-->SMX <---> CXF
Provider
(For Client Ack) (JMS/XA) |
Bean
|
(adds Target Op)
|
V
CXF-BC (For Followup ---> CXF-SE --> DB/Log/Persistent Store
on Long Running
Transaction)
Note I have used an SMX Bean whose code is pretty much the same as a Static
Routing Slip except it adds a target Operation which is lost by the
JMS-Consumer.
Hope this helps.
Cheers,
Ashwin...
Lukasz Lichota wrote:
>
> how are you going to verify that target service received the message?
> based on the fact that there was no exception?
>
> I think it may be possible to use to approach you chose, you can use EIP
> Static Recipien List
> http://servicemix.apache.org/servicemix-eip.html#servicemix-eip-StaticRecipientList
>
> now if you use SRL after JMS Consumer (and have multiple CXF Providers)
> your transaction will be rolled back on any fault on call of any provider,
> thus if the third provider fails, message will be send once again and
> first and the second service will receive this message again,
>
> to make it a bit better you could use separate transaction for each target
> that is to have SRL before JMS Provider, so you would have
> JMSProvider/Consumer/CXFProvider chain for each of the target services
>
> other question is what MEP is used by JMS consumer by default, what you
> need is Robust-In-Only becaue with In-Only you never get faults.
> You can specify this MEP using marshaller
> http://servicemix.apache.org/servicemix-jms-new-endpoints.html but maybe
> it's done like that by default,
> Ashwin, do you know?
>
> best regards
> Lukasz
>
> PS. also please note that you can configure redelivery policy for ActiveMQ
> in activemq.xml
>
> PS2. Your flow will be a bit complicated so taking look at Camel is also
> an option
>
>
>
> jav1erp wrote:
>>
>> The final idea is send in-only messages from a cxf application to
>> serveral cxf applications. All target applications need to receive the
>> message. If there is any down, smx has to resend the message.
>> So, first I thought to use "Recipient List" pattern using camel ( CXF
>> consumer - Camel - CXF producer) but how can I resolved the case in smx
>> is down? Using XA? There is not a clear example, and the smx
>> documentation is very poor.
>> Then I thought to use topic queues in the middle and use camel to resend
>> messages, but I have the problem with operation names.
>> What do you think about this case?
>>
>>
>>
>
>
-----
---
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/operation-name-is-null-after-jms-endpoints-tp21713138p21758088.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.