camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Troutwine <br...@troutwine.us>
Subject Re: Passive xmpp connections
Date Sat, 16 Apr 2011 13:46:07 GMT
Stan,

Thanks so much for your reply. The tests you shared show a route being
created to a specific user, from camel_producer to camel_consumer. I
am interested not in establishing a route between two users but
creating an open producing route which _any_ user might send a message
through. Once some user has sent a message through the open route, I
would like then to establish direct producer/consumer pairs with that
users.

To that end I have a producer with the following endpoint:

    xmpp://troutwine@jabber.org?password=secret

I am able to establish a connection with another user, say
brian@jabber.org and send a message through the above 'open' endpoint.
However, when I then go to create the producer/consumer routes at

    xmpp://troutwine@jabber.org/brian@jabber.org?password=secret

I no longer receive _any_ messages from troutwine, nor am I able to
deliver them through the producer I have constructed. Seemingly
o.a.camel.component.xmpp.XmppLogger is correctly logging inbound
messages; the actual connection to brian seems to have been lost.

On Fri, Apr 15, 2011 at 7:04 PM, Stan Lewis <slewis@fusesource.com> wrote:
> Hi Brian,
>
> When you set up a route with an xmpp component as a consumer (i.e. in
> the "from" of a route) the xmpp component will log in as that user,
> messages sent to that consumer will then be processed by that route.
> You can still log in as a producer from another route to produce
> messages as well.  There's some ignored test in the camel-xmpp code
> worth checking out:
>
> https://svn.apache.org/repos/asf/camel/trunk/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/XmppRouteChatTest.java
>
> and
>
> https://svn.apache.org/repos/asf/camel/trunk/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/XmppRouteMultipleProducersSingleConsumerTest.java
>
> They're disabled because they require an xmpp server to be set up.
>
> On Fri, Apr 15, 2011 at 3:21 PM, Brian Troutwine <brian@troutwine.us> wrote:
>> Hello, all.
>>
>> I understand from the XMPP documentation[1] how to actively create a
>> connection with another XMPP user. For instance, if I run a bot whose
>> JID is troutwine@jabber.org and I wish to establish a connection with
>> brian@jabber.org I use this endpoint:
>>
>>    xmpp://troutwine@jabber.org/brian@jabber.org?password=12345
>>
>> How do I passively establish connections? That is to say, how do I log
>> troutwine@jabber.org in so that brian@jabber.org can begin a chat with
>> it? Once a passive connection is established, how do I create
>> permanent Producer/Consumer endpoints  from the passive connection?
>>
>> --
>> Brian L. Troutwine
>>
>> [1] http://camel.apache.org/xmpp.html
>>
>



-- 
Brian L. Troutwine

Mime
View raw message