You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Kalle Kärkkäinen <ka...@intstream.fi> on 2009/03/19 12:27:46 UTC
ReplyTo header
Hi all,
I'm piecing together something and ran into a little bit of trouble.
I'm using the raw-amqp in java with 0-10; with org.apache.qpid.transport.Connection and Session. It's working well with the cpp broker, no worries there.
I use direct queues and try to get replyto's working. I'm sending plain messages with routing keys with ease, but when tagging messages like this:
session.messageTransfer( "exchange", MessageAcceptMode.EXPLICIT, MessageAcquireMode.PRE_ACQUIRED,new Header(new ReplyTo(null, "intstream.etrm.in"), new DeliveryProperties().setRoutingKey("intstream.etrm.out")),
//new Header(new DeliveryProperties().setRoutingKey("intstream.etrm.out")),
msg);
Re: ReplyTo header
Posted by Kalle Kärkkäinen <ka...@intstream.fi>.
Oh, live and learn.
It works great now, thanks!
--
Kalle
----- Original Message -----
From: "Gordon Sim" <gs...@redhat.com>
To: <us...@qpid.apache.org>
Sent: Thursday, March 19, 2009 2:01 PM
Subject: Re: ReplyTo header
> Kalle Kärkkäinen wrote:
>> I use direct queues and try to get replyto's working. I'm sending plain
>> messages with routing keys with ease, but when tagging messages like
>> this:
>>
>> session.messageTransfer( "exchange",
>> MessageAcceptMode.EXPLICIT,
>> MessageAcquireMode.PRE_ACQUIRED,
>> new Header(new DeliveryProperties().setRoutingKey("queue1"), new
>> ReplyTo("exchange", "queue2")), msg);
>
> I think that should be:
>
> session.messageTransfer( "exchange",
> MessageAcceptMode.EXPLICIT,
> MessageAcquireMode.PRE_ACQUIRED,
> new Header(
> new DeliveryProperties().setRoutingKey("queue1"),
> new MessageProperties().setReplyTo(new ReplyTo("exchange", "queue2")),
> msg);
>
> The two key structs types that are supported in the header are
> delivery-properties and message-properties. The reply-to struct is a field
> of message-properties.
>
>> So basically I've got one exchange, with queue1 and queue2. I'm trying to
>> send message to queue1, with replyto to queue2, so that my other process
>> will get a response.
>>
>> It seems that implementation to both DeliveryProperties and ReplyTo are
>> missing. I've got them from commons-M4 jar, but in common project there
>> is no sign of them.
>
> Those classes are generated from the AMQP spec file and are place in the
> build directory for compilation. E.g.
>
> build/common/src/org/apache/qpid/transport/ReplyTo.java
>
> --Gordon.
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project: http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org
Re: ReplyTo header
Posted by Gordon Sim <gs...@redhat.com>.
Kalle Kärkkäinen wrote:
> I use direct queues and try to get replyto's working. I'm sending plain
> messages with routing keys with ease, but when tagging messages like this:
>
> session.messageTransfer( "exchange",
> MessageAcceptMode.EXPLICIT,
> MessageAcquireMode.PRE_ACQUIRED,
> new Header(new DeliveryProperties().setRoutingKey("queue1"), new
> ReplyTo("exchange", "queue2")), msg);
I think that should be:
session.messageTransfer( "exchange",
MessageAcceptMode.EXPLICIT,
MessageAcquireMode.PRE_ACQUIRED,
new Header(
new DeliveryProperties().setRoutingKey("queue1"),
new MessageProperties().setReplyTo(new ReplyTo("exchange", "queue2")),
msg);
The two key structs types that are supported in the header are
delivery-properties and message-properties. The reply-to struct is a
field of message-properties.
> So basically I've got one exchange, with queue1 and queue2. I'm trying
> to send message to queue1, with replyto to queue2, so that my other
> process will get a response.
>
> It seems that implementation to both DeliveryProperties and ReplyTo are
> missing. I've got them from commons-M4 jar, but in common project there
> is no sign of them.
Those classes are generated from the AMQP spec file and are place in the
build directory for compilation. E.g.
build/common/src/org/apache/qpid/transport/ReplyTo.java
--Gordon.
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org
Re: ReplyTo header
Posted by Kalle Kärkkäinen <ka...@intstream.fi>.
Sorry, had a bit of premature posting there. :) Second try, now trying to
suppress control-enter.
Hi all,
I'm piecing together something and ran into a little bit of trouble.
I'm using the raw-amqp in java with 0-10; with
org.apache.qpid.transport.Connection and Session. It's working well with the
cpp broker, no worries there.
I use direct queues and try to get replyto's working. I'm sending plain
messages with routing keys with ease, but when tagging messages like this:
session.messageTransfer( "exchange",
MessageAcceptMode.EXPLICIT,
MessageAcquireMode.PRE_ACQUIRED,
new Header(new DeliveryProperties().setRoutingKey("queue1"), new
ReplyTo("exchange", "queue2")), msg);
So basically I've got one exchange, with queue1 and queue2. I'm trying to
send message to queue1, with replyto to queue2, so that my other process
will get a response.
It seems that implementation to both DeliveryProperties and ReplyTo are
missing. I've got them from commons-M4 jar, but in common project there is
no sign of them.
I get this UnsupportedOperation stack from Struct as it is defaulting to
that method in getEncodedType. I'm I using too cutting edge here?
I'm using this raw'ish interface because it seems simpler and more intuitive
than JMS, also should contain all the power of AMQP (I guess).
--
Kalle
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org