qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rajith Attapattu <rajit...@gmail.com>
Subject Re: JNDI problem
Date Thu, 19 Mar 2009 14:24:48 GMT
Hello ffrenchm,

please define your destination as follows
destination.TEST = direct://network.direct//TEST?routingkey='TEST'

queue.TEST = <queue_name> is short cut for defining a queue called
<queue_name> and binding it to amq.direct exchange with
routingkey=<queue_name>

similarly topic.TEST = <queue_name> creates a queue named <queue_name>
and binds it to amq.topic with routingkey=<queue_name>

So when you use queue.TEST =
direct://network.direct//TEST?routingkey='TEST' , what happens  is
"direct://network.direct//TEST?routingkey='TEST'" is interpreted as
the queue name not a URL.

Regards,

Rajith.

On Thu, Mar 19, 2009 at 9:39 AM, ffrenchm <ffrench.mathilde@gmail.com> wrote:
>
> Hello,
>
> I'm trying to use JNDI with my personnal exchange. I've an exchange called
> network.direct (type direct and durable), a queue TEST is binded on this
> queue.
>
> In my JMS sender when I define my destination like this :
>
> dest =
> session.createQueue("direct://network.direct//TEST?routingkey='TEST'");
>
> there is no problem...
>
> When I try to use the JNDI configuration like this :
>
> content of jndi.properties :
> -------------------------------------
> java.naming.factory.initial =
> org.apache.qpid.jndi.PropertiesFileInitialContextFactory
> java.naming.provider.url =
> /home/mffrench/work/BUS/POC/sandbox/QSNTools/conf-sender/JNDI-Dir/bindings
>
> content of bindings file:
> -----------------------------------
> connectionfactory.local =
> amqp://guest:guest@clientid/testpath?brokerlist='tcp://127.0.0.1:16969'
> queue.TEST = direct://network.direct//TEST?routingkey='TEST'
>
> and define my destination like this :
> dest = (Destination)context.lookup(destName); //(where destName="TEST")
>
> the destination always define my exchange as amq.direct (and so I lose my
> message) :
>
> main 2009-03-19 14:28:53,168 DEBUG [apache.qpid.transport.Connection] SEND:
> [conn:2cb49d] ch=0 id=1 MessageTransfer(destination=amq.direct,
> acceptMode=NONE, acquireMode=PRE_ACQUIRED)
>  DeliveryProperties(priority=LOWEST, deliveryMode=PERSISTENT,
> timestamp=1237469333157, expiration=0, exchange=amq.direct,
> routingKey=direct://network.direct//TEST?routingkey='TEST')
>  MessageProperties(contentLength=0,
> messageId=95a14f11-0b73-3731-8ef7-70f566a4e287, contentType=text/plain,
> userId=[B@11e0c13)
>  body="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"...
> main 2009-03-19 14:28:53,168 DEBUG [apache.qpid.transport.Connection] FLUSH:
> [conn:2cb49d]
>
> As you can see my jndi configuration override the routingKey MessageTransfer
> property... Is this a bug or do I make a mistake ?
>
> Thanks for all
> --
> View this message in context: http://n2.nabble.com/JNDI-problem-tp2502951p2502951.html
> Sent from the Apache Qpid users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>



-- 
Regards,

Rajith Attapattu
Red Hat
http://rajith.2rlabs.com/

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Mime
View raw message