So from my reading of the qpid-amqp-1-0-client-jms  client code, single
section sequence message that are received by the client will be treated as
JMS Stream Messages, but Stream messages are sent as an AmqpValue
containing a List of objects

In order to send a Sequence message you'll need to create a sub-class of
org.apache.qpid.amqp_1_0.jms.impl.AmqpMessageImpl with the List<Section>
sections containing one or more instances of org.apache.qpid.amqp_1_0.type.
messaging.AmqpSequence

Alternatively you could just use amqp-value section messages, where the
contents of the message is a list (which is how Stream messages work as
detailed above).

Hope this helps,
Rob

On 13 April 2016 at 12:13, Jiří Neuman <[email protected]>
wrote:

> Thanks a lot for your reply. We’re not using the qpid-jms-client library,
> but qpid-amqp-1-0-client-jms instead as we are using Apache Camel, which
> uses this library and not mentioned qpid-jms-client. Not sure if this makes
> any difference. We were able to asses that we should use the StreamMessage,
> but there seems to be no obvious public API that we can use to easily
> construct such message (in contrast to the object message). So I’m
> wondering if we are missing something or if we really need to build it on
> our own.
>
>
> S pozdravem / Best regards
> Jiří Neuman
> Unicorn Systems
> Mobile: (+420) 724 531 690
> www.unicornsystems.eu
>
> > 12. 4. 2016 v 18:41, Robbie Gemmell <[email protected]>:
> >
> > I'm going to assume you mean the newer AMQP 1.0 JMS client
> > ('qpid-jms-client' maven artifactId). If you don't, disregard the
> > below.
> >
> > I believe the only way the client can currently send an amqp-sequence
> > body is when sending a StreamMessage. There is intention to define a
> > means of sending more varied payloads through use of ObjectMessage
> > eventually, but that isnt something thats in place yet.
> >
> > Incoming messages with an amqp-sequence body will be treated as a
> > SteamMessage only if annotated to indicate they are JMS stream
> > messages (i.e sent by the JMS client, or somthing else annotating the
> > contents are suitable), otherwise the contents of the sequence will be
> > given as a List inside an ObjectMessage.
> >
> > Robbie
> >
> > On 12 April 2016 at 15:18, Jiří Neuman <[email protected]>
> wrote:
> >> Hi,
> >>
> >> We’re using Apache Qpid client (for AMQP 1.0) in a Java-based project
> and we are looking into the use of amqp-sequence in the message body
> (payload). We were not able to find a direct support for producing /
> consuming a message with AMQP sequence type in the Qpid library (besides
> internal classes that seem to handle the translation to the wire-format).
> Is there any support for this usecase that we could use or do we have to
> implement it ourselves? Can you point me to any examples / references that
> can be helpful in building a client sending an AMQP message with a
> amqp-sequence type?
> >>
> >> S pozdravem / Best regards
> >> Jiří Neuman
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> >
>
>

Reply via email to