You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by ffrenchm <ff...@gmail.com> on 2009/03/19 14:39:10 UTC
JNDI problem
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
Re: JNDI problem
Posted by ffrenchm <ff...@gmail.com>.
done ! :)
https://issues.apache.org/jira/browse/QPID-1777
Yes please file a JIRA.
We could trim the names to remove any leading/trailing white spaces.
Regards,
Rajith
On Wed, Mar 25, 2009 at 6:52 AM, ffrenchm <ff...@gmail.com> wrote:
>
> Hello,
>
> I've another JNDI problem :)
>
> When I declare this JNDI queue :
>
> queue.<jndi_queue> = <physical_queue >
>
> The queue "physical_queue " is created and it's impossible to remove it after ....
>
> I think it will be easy to correct before M5. Want a JIRA ?
>
> ++
> --
> View this message in context: http://n2.nabble.com/JNDI-problem-tp2502951p2531720.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
--
View this message in context: http://n2.nabble.com/JNDI-problem-tp2502951p2533874.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
Re: JNDI problem
Posted by Rajith Attapattu <ra...@gmail.com>.
Yes please file a JIRA.
We could trim the names to remove any leading/trailing white spaces.
Regards,
Rajith
On Wed, Mar 25, 2009 at 6:52 AM, ffrenchm <ff...@gmail.com> wrote:
>
> Hello,
>
> I've another JNDI problem :)
>
> When I declare this JNDI queue :
>
> queue.<jndi_queue> = <physical_queue >
>
> The queue "physical_queue " is created and it's impossible to remove it after ....
>
> I think it will be easy to correct before M5. Want a JIRA ?
>
> ++
> --
> View this message in context: http://n2.nabble.com/JNDI-problem-tp2502951p2531720.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
Re: JNDI problem
Posted by ffrenchm <ff...@gmail.com>.
Hello,
I've another JNDI problem :)
When I declare this JNDI queue :
queue.<jndi_queue> = <physical_queue >
The queue "physical_queue " is created and it's impossible to remove it after ....
I think it will be easy to correct before M5. Want a JIRA ?
++
--
View this message in context: http://n2.nabble.com/JNDI-problem-tp2502951p2531720.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
Re: JNDI problem
Posted by Rajith Attapattu <ra...@gmail.com>.
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 <ff...@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