Project

General

Profile

AMP and routing problem

Steffen Larsen
Added about 3 years ago

Hi,

I have a strange "problem" with AMP (XEP-0079).

The scenario:

  • I have a cluster (version 5.2.x) with two nodes (Nothing special is set in the SM configuration (init.properties)).

  • I have 3 clients connected with same JID (two connected via BOSH, one via normal TCP)

  • I send an AMP message with the rule=deliver, action=drop, value=store

What happens is that only two of the clients gets this message. When sending a normal message stanza to the bare JID (admin@test.dk) I receive them on all three clients.

Why is that? its quite hard to read and understand the XEP fully and what happens with this rules and actions.

The message thats not delivered to all of the clients:

<message id="c830e500-13d5-44e4-bf24-cf09c897abb3" to="admin@xmpp.test.dk" from="rest.xmpp.test.dk" xmlns="jabber:client" type="chat"><body>TEST</body><amp xmlns="http://jabber.org/protocol/amp"><rule condition="deliver" action="drop" value="stored"/></amp></message>


Replies (8)

Added by Steffen Larsen about 3 years ago

And the AMP message is sent from the backend via the REST ad-hoc command layer (hence the strange from address).

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam about 3 years ago

Hi,

Before I will be able to look into this and find answer to question why it is not delivered to one of clients, I would like to know few things:

  • I suspect that all clients are connected to account @admin@xmpp.test.dk@, but are they all connected to same cluster node?

  • Do you use defafult clustering from Tigase XMPP Server or clustering from Tigase ACS?

  • You state that @When sending a normal message stanza to the bare JID (admin@test.dk) I receive them on all three clients.@. Do you send this plain message also using REST adhoc command layer?

  • Could you check if this issue appears also in case of AMP messages sent from client? or it appears only when sent from REST adhoc command?

Added by Steffen Larsen about 3 years ago

  1. yes all are connected to the same cluster node.. (I also tried to let one on another node but it did not seem to matter)

  2. The ACS one

  3. Yes I sent all trough the rest interface. both normal message and the AMP one.

  4. i'll check tomorrow

Added by Steffen Larsen about 3 years ago

The problem also appears using a normal client AMP message.. Although I only get it in 1 out of the 3 clients.

I was trying to send this message:

@

TESTTTTTTT

@

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam about 3 years ago

I checked this issue and in versions 5.2.x of Tigase XMPP Server when message was sent to bare jid with AMP payload then message is delivered only to XMPP client connection of destination bare jid with highest priority.

In your case as message was sent from/to same user jid then message with AMP payload was delivered to sender of message (as same jid) and to other connection with highest priority.

This delivery to only one resource with highest priority was changed in Tigase XMPP Server 7.0.x.

In latest build of Tigase XMPP Server 7.1.0-SNAPSHOT I've found an issue with delivery of message with AMP in clustered mode when client connections for same bare jid are established to different cluster node. Fix for this issue will be part of next snapshot build.

Added by Steffen Larsen about 3 years ago

Hi Andrzej!,

Ok I see.

I actually expected that AMP was routed like a normal message stanza when sending to a bare jid.

So two questions:

  • How is the expected routing if I just send a normal message (no AMP) to a bare JID?

  • Previously the message was sent to all of the connected clients. But maybe thats implicit because Carbons is enabled pr default or?

-Cheers!

/Steffen

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam about 3 years ago

Yes, I agree that message with AMP sent to bare JID should be routed same as normal message (delivered to every connection with non-negative priority for bare JID) - this was changed in 7.0.x version to work as expected and as I tested on version 7.1.0-SNAPSHOT message sent to bare JID with AMP payload is delivered to every connection with non-negative priority for bare JID.

So answering your questions:

  • Normal message (no AMP) would be delivered to every connection for bare JID in 5.2.x (and in newest version it would be delivered to any connection for bare JID with non-negative priority)

  • Nomal message is still delivered to all connected clients (only AMP payload changed behavior of delivery in 5.2.x)

Added by Steffen Larsen about 3 years ago

Super!. Thanks for a clear answer Andrzej!

    (1-8/8)