You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Rajika Kumarasiri <ra...@gmail.com> on 2008/07/30 10:44:36 UTC
in-VM support between qpid and an application running on the same host
hello everybody,
I have been using Java broker for some time now and it is possible to
optimize away a network hop if we can make the broker and the server
process-which is a another application, run within the same
JVM so that they can communicate through a in-VM link.
I need to know wether it is possible to create a embedded brokers in my
server process . Please comment.
Thanks in advance.
-Rajika
--
http://wso2.org/
http://llvm.org/
Re: in-VM support between qpid and an application running on the same host
Posted by Rajika Kumarasiri <ra...@gmail.com>.
On Wed, Jul 30, 2008 at 2:24 PM, Aidan Skinner <ai...@apache.org> wrote:
hi Aidan,
Thanks for the quick reply. I'll have a look at the samples.
-Rajika
On Wed, Jul 30, 2008 at 9:44 AM, Rajika Kumarasiri <ra...@gmail.com>
> wrote:
>
> > I have been using Java broker for some time now and it is possible to
> > optimize away a network hop if we can make the broker and the server
> > process-which is a another application, run within the same
> > JVM so that they can communicate through a in-VM link.
> > I need to know wether it is possible to create a embedded brokers in my
> > server process . Please comment.
>
> Yep, Mina can definately be made to do this. Have a look at
> QpidTestCase on trunk for an example of doing this.
>
> - Aidan
> --
> Apache Qpid - World Domination through Advanced Message Queueing
> http://cwiki.apache.org/qpid
>
--
http://wso2.org/
http://llvm.org/
Re: in-VM support between qpid and an application running on the same host
Posted by Rajika Kumarasiri <ra...@gmail.com>.
On Fri, Aug 8, 2008 at 1:13 PM, Martin Ritchie <ri...@apache.org> wrote:
Hi Martin,
Thanks for the reply. That fix it.
-Rajika
> 2008/8/8 Rajika Kumarasiri <ra...@gmail.com>:
> > On Wed, Jul 30, 2008 at 2:24 PM, Aidan Skinner <ai...@apache.org> wrote:
> > Hey Aidan,
> > Is there is a way to enable auto creation of VM broker, may be passing a
> > JNDI property ?
> > Thanks
> >
> > -Rajika
>
> Rajika,
>
>
> You can set system property amqj.AutoCreateVMBroker to true and then
> the client code will automatically create any VM broker you attempt to
> connect to in your JNDI string.
>
> I'd also take a look at the Main class in the broker as your Server
> application that starts the InVM process will also need to bind to a
> TCP port as the broker's Main class does other wise you won't be able
> to connect to the broker via TCP.
>
> Regards
>
> Martin
>
>
> >
> > On Wed, Jul 30, 2008 at 9:44 AM, Rajika Kumarasiri <ra...@gmail.com>
> >> wrote:
> >>
> >> > I have been using Java broker for some time now and it is possible to
> >> > optimize away a network hop if we can make the broker and the server
> >> > process-which is a another application, run within the same
> >> > JVM so that they can communicate through a in-VM link.
> >> > I need to know wether it is possible to create a embedded brokers in
> my
> >> > server process . Please comment.
> >>
> >> Yep, Mina can definately be made to do this. Have a look at
> >> QpidTestCase on trunk for an example of doing this.
> >
> >
> >
> >
> >>
> >>
> >> - Aidan
> >> --
> >> Apache Qpid - World Domination through Advanced Message Queueing
> >> http://cwiki.apache.org/qpid
> >>
> >
> >
> >
> > --
> > http://wso2.org/
> > http://llvm.org/
> >
>
>
>
> --
> Martin Ritchie
>
--
http://wso2.org/
http://llvm.org/
Re: in-VM support between qpid and an application running on the same host
Posted by Rajika Kumarasiri <ra...@gmail.com>.
On Tue, Aug 12, 2008 at 2:42 PM, Martin Ritchie <ri...@apache.org> wrote:
> 2008/8/12 Rajika Kumarasiri <ra...@gmail.com>:
> > On Fri, Aug 8, 2008 at 1:13 PM, Martin Ritchie <ri...@apache.org>
> wrote:
> > Hey Martin,
> > I have a small question. I was able to create the VM broker and use it
> > properly.
> > But when I need to create the VM broker in addition to the vm:port
> specified
> > in the connection URL(ex: connectionfactory.local =
> > amqp://guest:guest@clientid/testpath?brokerlist='vm://:1')
> > I have to either need to set the system property, amqj.AutoCreateVMBroker
> > true or create a VM broker using TransportConnection.createVMBroker(1).
> If I
> > only specified the connection URL only, I am getting the error, that "no
> VM
> > broker on port 1". So my question is, is there is a way to create a VM
> > broker only specifying the connection URL (as in above example) for a VM
> > broker in port 1, or do we still need to have either
> amqj.AutoCreateVMBroker
> > true or create a VM broker using TransportConnection.createVMBroker(1) ?
> Or
> > is there is a way to specify that system propertry, in a jndi.properties
> > file which we use to create the initial context.
> >
> > Hope you understand my problem. Thanks in advance.
> >
> > -Rajika
>
> Rajika,
Hey Martin thanks for the repose. I'll raise an issue in JIRA.
-Rajika
>
>
> There isn't currently the ability to do that but if you raise a JIRA
> requesting the functionality then we can look to adding it. I don't
> think it should be to much work and I know we have talked in the past
> about adding such an ability to AutoCreate from the URL.
>
> Regards
>
> Martin
> >
> > 2008/8/8 Rajika Kumarasiri <ra...@gmail.com>:
> >> > On Wed, Jul 30, 2008 at 2:24 PM, Aidan Skinner <ai...@apache.org>
> wrote:
> >> > Hey Aidan,
> >> > Is there is a way to enable auto creation of VM broker, may be passing
> a
> >> > JNDI property ?
> >> > Thanks
> >> >
> >> > -Rajika
> >>
> >> Rajika,
> >>
> >> You can set system property amqj.AutoCreateVMBroker to true and then
> >> the client code will automatically create any VM broker you attempt to
> >> connect to in your JNDI string.
> >>
> >> I'd also take a look at the Main class in the broker as your Server
> >> application that starts the InVM process will also need to bind to a
> >> TCP port as the broker's Main class does other wise you won't be able
> >> to connect to the broker via TCP.
> >>
> >> Regards
> >>
> >> Martin
> >>
> >>
> >> >
> >> > On Wed, Jul 30, 2008 at 9:44 AM, Rajika Kumarasiri <
> rajikacc@gmail.com>
> >> >> wrote:
> >> >>
> >> >> > I have been using Java broker for some time now and it is possible
> to
> >> >> > optimize away a network hop if we can make the broker and the
> server
> >> >> > process-which is a another application, run within the same
> >> >> > JVM so that they can communicate through a in-VM link.
> >> >> > I need to know wether it is possible to create a embedded brokers
> in
> >> my
> >> >> > server process . Please comment.
> >> >>
> >> >> Yep, Mina can definately be made to do this. Have a look at
> >> >> QpidTestCase on trunk for an example of doing this.
> >> >
> >> >
> >> >
> >> >
> >> >>
> >> >>
> >> >> - Aidan
> >> >> --
> >> >> Apache Qpid - World Domination through Advanced Message Queueing
> >> >> http://cwiki.apache.org/qpid
> >> >>
> >> >
> >> >
> >> >
> >> > --
> >> > http://wso2.org/
> >> > http://llvm.org/
> >> >
> >>
> >>
> >>
> >> --
> >> Martin Ritchie
> >>
> >
> >
> >
> > --
> > http://wso2.org/
> > http://llvm.org/
> >
>
>
>
> --
> Martin Ritchie
>
--
http://wso2.org/
http://llvm.org/
Re: in-VM support between qpid and an application running on the same host
Posted by Martin Ritchie <ri...@apache.org>.
2008/8/12 Rajika Kumarasiri <ra...@gmail.com>:
> On Fri, Aug 8, 2008 at 1:13 PM, Martin Ritchie <ri...@apache.org> wrote:
> Hey Martin,
> I have a small question. I was able to create the VM broker and use it
> properly.
> But when I need to create the VM broker in addition to the vm:port specified
> in the connection URL(ex: connectionfactory.local =
> amqp://guest:guest@clientid/testpath?brokerlist='vm://:1')
> I have to either need to set the system property, amqj.AutoCreateVMBroker
> true or create a VM broker using TransportConnection.createVMBroker(1). If I
> only specified the connection URL only, I am getting the error, that "no VM
> broker on port 1". So my question is, is there is a way to create a VM
> broker only specifying the connection URL (as in above example) for a VM
> broker in port 1, or do we still need to have either amqj.AutoCreateVMBroker
> true or create a VM broker using TransportConnection.createVMBroker(1) ? Or
> is there is a way to specify that system propertry, in a jndi.properties
> file which we use to create the initial context.
>
> Hope you understand my problem. Thanks in advance.
>
> -Rajika
Rajika,
There isn't currently the ability to do that but if you raise a JIRA
requesting the functionality then we can look to adding it. I don't
think it should be to much work and I know we have talked in the past
about adding such an ability to AutoCreate from the URL.
Regards
Martin
>
> 2008/8/8 Rajika Kumarasiri <ra...@gmail.com>:
>> > On Wed, Jul 30, 2008 at 2:24 PM, Aidan Skinner <ai...@apache.org> wrote:
>> > Hey Aidan,
>> > Is there is a way to enable auto creation of VM broker, may be passing a
>> > JNDI property ?
>> > Thanks
>> >
>> > -Rajika
>>
>> Rajika,
>>
>> You can set system property amqj.AutoCreateVMBroker to true and then
>> the client code will automatically create any VM broker you attempt to
>> connect to in your JNDI string.
>>
>> I'd also take a look at the Main class in the broker as your Server
>> application that starts the InVM process will also need to bind to a
>> TCP port as the broker's Main class does other wise you won't be able
>> to connect to the broker via TCP.
>>
>> Regards
>>
>> Martin
>>
>>
>> >
>> > On Wed, Jul 30, 2008 at 9:44 AM, Rajika Kumarasiri <ra...@gmail.com>
>> >> wrote:
>> >>
>> >> > I have been using Java broker for some time now and it is possible to
>> >> > optimize away a network hop if we can make the broker and the server
>> >> > process-which is a another application, run within the same
>> >> > JVM so that they can communicate through a in-VM link.
>> >> > I need to know wether it is possible to create a embedded brokers in
>> my
>> >> > server process . Please comment.
>> >>
>> >> Yep, Mina can definately be made to do this. Have a look at
>> >> QpidTestCase on trunk for an example of doing this.
>> >
>> >
>> >
>> >
>> >>
>> >>
>> >> - Aidan
>> >> --
>> >> Apache Qpid - World Domination through Advanced Message Queueing
>> >> http://cwiki.apache.org/qpid
>> >>
>> >
>> >
>> >
>> > --
>> > http://wso2.org/
>> > http://llvm.org/
>> >
>>
>>
>>
>> --
>> Martin Ritchie
>>
>
>
>
> --
> http://wso2.org/
> http://llvm.org/
>
--
Martin Ritchie
Re: in-VM support between qpid and an application running on the same host
Posted by Rajika Kumarasiri <ra...@gmail.com>.
On Fri, Aug 8, 2008 at 1:13 PM, Martin Ritchie <ri...@apache.org> wrote:
Hey Martin,
I have a small question. I was able to create the VM broker and use it
properly.
But when I need to create the VM broker in addition to the vm:port specified
in the connection URL(ex: connectionfactory.local =
amqp://guest:guest@clientid/testpath?brokerlist='vm://:1')
I have to either need to set the system property, amqj.AutoCreateVMBroker
true or create a VM broker using TransportConnection.createVMBroker(1). If I
only specified the connection URL only, I am getting the error, that "no VM
broker on port 1". So my question is, is there is a way to create a VM
broker only specifying the connection URL (as in above example) for a VM
broker in port 1, or do we still need to have either amqj.AutoCreateVMBroker
true or create a VM broker using TransportConnection.createVMBroker(1) ? Or
is there is a way to specify that system propertry, in a jndi.properties
file which we use to create the initial context.
Hope you understand my problem. Thanks in advance.
-Rajika
2008/8/8 Rajika Kumarasiri <ra...@gmail.com>:
> > On Wed, Jul 30, 2008 at 2:24 PM, Aidan Skinner <ai...@apache.org> wrote:
> > Hey Aidan,
> > Is there is a way to enable auto creation of VM broker, may be passing a
> > JNDI property ?
> > Thanks
> >
> > -Rajika
>
> Rajika,
>
> You can set system property amqj.AutoCreateVMBroker to true and then
> the client code will automatically create any VM broker you attempt to
> connect to in your JNDI string.
>
> I'd also take a look at the Main class in the broker as your Server
> application that starts the InVM process will also need to bind to a
> TCP port as the broker's Main class does other wise you won't be able
> to connect to the broker via TCP.
>
> Regards
>
> Martin
>
>
> >
> > On Wed, Jul 30, 2008 at 9:44 AM, Rajika Kumarasiri <ra...@gmail.com>
> >> wrote:
> >>
> >> > I have been using Java broker for some time now and it is possible to
> >> > optimize away a network hop if we can make the broker and the server
> >> > process-which is a another application, run within the same
> >> > JVM so that they can communicate through a in-VM link.
> >> > I need to know wether it is possible to create a embedded brokers in
> my
> >> > server process . Please comment.
> >>
> >> Yep, Mina can definately be made to do this. Have a look at
> >> QpidTestCase on trunk for an example of doing this.
> >
> >
> >
> >
> >>
> >>
> >> - Aidan
> >> --
> >> Apache Qpid - World Domination through Advanced Message Queueing
> >> http://cwiki.apache.org/qpid
> >>
> >
> >
> >
> > --
> > http://wso2.org/
> > http://llvm.org/
> >
>
>
>
> --
> Martin Ritchie
>
--
http://wso2.org/
http://llvm.org/
Re: in-VM support between qpid and an application running on the same host
Posted by Martin Ritchie <ri...@apache.org>.
2008/8/8 Rajika Kumarasiri <ra...@gmail.com>:
> On Wed, Jul 30, 2008 at 2:24 PM, Aidan Skinner <ai...@apache.org> wrote:
> Hey Aidan,
> Is there is a way to enable auto creation of VM broker, may be passing a
> JNDI property ?
> Thanks
>
> -Rajika
Rajika,
You can set system property amqj.AutoCreateVMBroker to true and then
the client code will automatically create any VM broker you attempt to
connect to in your JNDI string.
I'd also take a look at the Main class in the broker as your Server
application that starts the InVM process will also need to bind to a
TCP port as the broker's Main class does other wise you won't be able
to connect to the broker via TCP.
Regards
Martin
>
> On Wed, Jul 30, 2008 at 9:44 AM, Rajika Kumarasiri <ra...@gmail.com>
>> wrote:
>>
>> > I have been using Java broker for some time now and it is possible to
>> > optimize away a network hop if we can make the broker and the server
>> > process-which is a another application, run within the same
>> > JVM so that they can communicate through a in-VM link.
>> > I need to know wether it is possible to create a embedded brokers in my
>> > server process . Please comment.
>>
>> Yep, Mina can definately be made to do this. Have a look at
>> QpidTestCase on trunk for an example of doing this.
>
>
>
>
>>
>>
>> - Aidan
>> --
>> Apache Qpid - World Domination through Advanced Message Queueing
>> http://cwiki.apache.org/qpid
>>
>
>
>
> --
> http://wso2.org/
> http://llvm.org/
>
--
Martin Ritchie
Re: in-VM support between qpid and an application running on the same host
Posted by Marnie McCormack <ma...@googlemail.com>.
Hi Rajika,
Just wanted to note that Qpid is heap bound when running with transient
messaging, so sharing the VM will make this more likely - one to look out
for.
If you're using persistent messaging this is much less of an issue, but will
still impact broker performance at higher volumes.
Hth,
Marnie
On 8/8/08, Rajika Kumarasiri <ra...@gmail.com> wrote:
>
> On Wed, Jul 30, 2008 at 2:24 PM, Aidan Skinner <ai...@apache.org> wrote:
> Hey Aidan,
> Is there is a way to enable auto creation of VM broker, may be passing a
> JNDI property ?
> Thanks
>
> -Rajika
>
>
> On Wed, Jul 30, 2008 at 9:44 AM, Rajika Kumarasiri <ra...@gmail.com>
> > wrote:
> >
> > > I have been using Java broker for some time now and it is possible to
> > > optimize away a network hop if we can make the broker and the server
> > > process-which is a another application, run within the same
> > > JVM so that they can communicate through a in-VM link.
> > > I need to know wether it is possible to create a embedded brokers in
> my
> > > server process . Please comment.
> >
> > Yep, Mina can definately be made to do this. Have a look at
> > QpidTestCase on trunk for an example of doing this.
>
>
>
>
> >
> >
> > - Aidan
> > --
> > Apache Qpid - World Domination through Advanced Message Queueing
> > http://cwiki.apache.org/qpid
> >
>
>
>
> --
> http://wso2.org/
> http://llvm.org/
>
Re: in-VM support between qpid and an application running on the same host
Posted by Rajika Kumarasiri <ra...@gmail.com>.
On Wed, Jul 30, 2008 at 2:24 PM, Aidan Skinner <ai...@apache.org> wrote:
Hey Aidan,
Is there is a way to enable auto creation of VM broker, may be passing a
JNDI property ?
Thanks
-Rajika
On Wed, Jul 30, 2008 at 9:44 AM, Rajika Kumarasiri <ra...@gmail.com>
> wrote:
>
> > I have been using Java broker for some time now and it is possible to
> > optimize away a network hop if we can make the broker and the server
> > process-which is a another application, run within the same
> > JVM so that they can communicate through a in-VM link.
> > I need to know wether it is possible to create a embedded brokers in my
> > server process . Please comment.
>
> Yep, Mina can definately be made to do this. Have a look at
> QpidTestCase on trunk for an example of doing this.
>
>
> - Aidan
> --
> Apache Qpid - World Domination through Advanced Message Queueing
> http://cwiki.apache.org/qpid
>
--
http://wso2.org/
http://llvm.org/
Re: in-VM support between qpid and an application running on the same host
Posted by Aidan Skinner <ai...@apache.org>.
On Wed, Jul 30, 2008 at 9:44 AM, Rajika Kumarasiri <ra...@gmail.com> wrote:
> I have been using Java broker for some time now and it is possible to
> optimize away a network hop if we can make the broker and the server
> process-which is a another application, run within the same
> JVM so that they can communicate through a in-VM link.
> I need to know wether it is possible to create a embedded brokers in my
> server process . Please comment.
Yep, Mina can definately be made to do this. Have a look at
QpidTestCase on trunk for an example of doing this.
- Aidan
--
Apache Qpid - World Domination through Advanced Message Queueing
http://cwiki.apache.org/qpid