camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CAMEL-9804) XMPP chat responding not woring
Date Mon, 04 Apr 2016 06:10:25 GMT

     [ https://issues.apache.org/jira/browse/CAMEL-9804?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Claus Ibsen resolved CAMEL-9804.
--------------------------------
    Resolution: Invalid
      Assignee: Claus Ibsen

Please use the user mailing list / user forum to get help / ask questions first
http://camel.apache.org/mailing-lists.html
http://camel.apache.org/discussion-forums.html

> XMPP chat responding not woring
> -------------------------------
>
>                 Key: CAMEL-9804
>                 URL: https://issues.apache.org/jira/browse/CAMEL-9804
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-xmpp
>    Affects Versions: 2.17.0
>         Environment: jdk1.8.0_65
>            Reporter: martin scharm
>            Assignee: Claus Ibsen
>
> I tried to implement a simple XMPP bot, but reading and responding to the same XMPP chat
seems to fail: The bot sends the message to itself.
> The endpoint is created like the following:
> {code:java}
> String
> userA = "bot",
> userB = "human",
> server = "SERVER",
> port = "5222",
> passwordA = "secret";
> final String chatEndpoint =
>       String.format("xmpp://%s@%s:%s/%s@%s?password=%s",
>               userA, server, port,
>               userB, server, passwordA);
> {code}
> which produces an endpoint such as {{xmpp://bot@SERVER:5222/human@SERVER?password=secret}},
so the {{bot}} authenticates with {{SERVER}} and it will talk to {{human@SERVER}}.
> The bot is able to read from XMPP and dump the messages to std::out:
> {code:java}
> from(chatEndpoint)
> .to("stream:out");
> {code}
> And the bot is able to send XMPP messages:
> {code:java}
> from("timer://foo?fixedRate=true&period=1000")
> .setBody(constant("test"))
> .to(chatEndpoint); 
> {code}
> So far, I'm really impressed :)
> However, simply responding the human's message fails:
> {code:java}
> from(chatEndpoint)
> .to(chatEndpoint);
> {code}
> My XMPP server (prosody) shows me, that the bot sends the messages to itself:
> {code:java}
> debug   Received[c2s]: <message id='g0x1L-5' type='chat' to='bot@SERVER' from='bot@SERVER/Camel'>
> {code}
> But I have no idea why.. Am I doing something wrong?
> I tried adding {{&participant=human@SERVER}} to the {{chatEndpoint}} which doesn't
solve the issue. I also tried to create two separate chat endpoints with different resource
names, but that didn't work either. :(



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message