You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Cristiano Costantini <cr...@gmail.com> on 2013/05/29 15:38:03 UTC

SEDA vs JMS/ActiveMQ

Hello,

I've been prototyping my application using SEDA and I wrote routes with
endpoints using this component.

Now I've started to make some tests using an embedded ActiveMQ and
substituting the seda: endpoints with jms: or activemq:

Of course! I've started getting many errors as I was using custom classes
both as body and headers in camel Exchanges.

I'm not an expert at all of JMS or ActiveMQ, but I need it to
implement Guaranteed Delivery and Durable Subscriber patterns.


How should I deal with serialization of classes in body and headers when
using ActiveMQ? (my classes don't implement Serializable but are annotated
with JaxB and can be marshalled/unmarshalled)

Do you know any web resource which I can study to learn using ActiveMQ for
my needs?

Thank you again,
Cristiano

Re: SEDA vs JMS/ActiveMQ

Posted by Cristiano Costantini <cr...@gmail.com>.
For those who will get in the same trouble as mine, read chapter 7.3.3 of
Camel In Action: "Message mappings".

I've not yet understood how to deal with JMS but at least I've started
understanding how it support the Camel Exchange.


2013/5/29 Cristiano Costantini <cr...@gmail.com>

> Reading now chapter 7.3.1 of Camel in Action about "Sending and Receiving
> messages" for JMS component, it is helping me getting some clarifications...
>
>
> 2013/5/29 Cristiano Costantini <cr...@gmail.com>
>
>> Hello,
>>
>> I've been prototyping my application using SEDA and I wrote routes with
>> endpoints using this component.
>>
>> Now I've started to make some tests using an embedded ActiveMQ and
>> substituting the seda: endpoints with jms: or activemq:
>>
>> Of course! I've started getting many errors as I was using custom classes
>> both as body and headers in camel Exchanges.
>>
>> I'm not an expert at all of JMS or ActiveMQ, but I need it to
>> implement Guaranteed Delivery and Durable Subscriber patterns.
>>
>>
>> How should I deal with serialization of classes in body and headers when
>> using ActiveMQ? (my classes don't implement Serializable but are annotated
>> with JaxB and can be marshalled/unmarshalled)
>>
>> Do you know any web resource which I can study to learn using ActiveMQ
>> for my needs?
>>
>> Thank you again,
>> Cristiano
>>
>
>

Re: SEDA vs JMS/ActiveMQ

Posted by Cristiano Costantini <cr...@gmail.com>.
Reading now chapter 7.3.1 of Camel in Action about "Sending and Receiving
messages" for JMS component, it is helping me getting some clarifications...


2013/5/29 Cristiano Costantini <cr...@gmail.com>

> Hello,
>
> I've been prototyping my application using SEDA and I wrote routes with
> endpoints using this component.
>
> Now I've started to make some tests using an embedded ActiveMQ and
> substituting the seda: endpoints with jms: or activemq:
>
> Of course! I've started getting many errors as I was using custom classes
> both as body and headers in camel Exchanges.
>
> I'm not an expert at all of JMS or ActiveMQ, but I need it to
> implement Guaranteed Delivery and Durable Subscriber patterns.
>
>
> How should I deal with serialization of classes in body and headers when
> using ActiveMQ? (my classes don't implement Serializable but are annotated
> with JaxB and can be marshalled/unmarshalled)
>
> Do you know any web resource which I can study to learn using ActiveMQ for
> my needs?
>
> Thank you again,
> Cristiano
>

Re: SEDA vs JMS/ActiveMQ

Posted by Claus Ibsen <cl...@gmail.com>.
For you JAXB classes you can use javax.jmx.TextMessage as the type.
Then the data is a String in XML format.
If you have camel-jaxb on the classpath then Camel can automatic
marshal from POJO via JAXB to XML as a String.

To force use TextMessage you can configure the JMX endpoint with
jmsMessageType=Text.

But still when you use JMS then the JMS spec has limitations of what
type can be used. See the details on the Camel JMS page.
http://camel.apache.org/jms



On Wed, May 29, 2013 at 3:38 PM, Cristiano Costantini
<cr...@gmail.com> wrote:
> Hello,
>
> I've been prototyping my application using SEDA and I wrote routes with
> endpoints using this component.
>
> Now I've started to make some tests using an embedded ActiveMQ and
> substituting the seda: endpoints with jms: or activemq:
>
> Of course! I've started getting many errors as I was using custom classes
> both as body and headers in camel Exchanges.
>
> I'm not an expert at all of JMS or ActiveMQ, but I need it to
> implement Guaranteed Delivery and Durable Subscriber patterns.
>
>
> How should I deal with serialization of classes in body and headers when
> using ActiveMQ? (my classes don't implement Serializable but are annotated
> with JaxB and can be marshalled/unmarshalled)
>
> Do you know any web resource which I can study to learn using ActiveMQ for
> my needs?
>
> Thank you again,
> Cristiano



-- 
Claus Ibsen
-----------------
www.camelone.org: The open source integration conference.

Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen