PepEventListener does not receive events sent

Hi,
I’m using smack 4.4.4, I’ve published avatar data and then avatar metadata to the metadata node, the event is published successfully and sent to my roster, problem is, it’s not captured by PepEventListener. Below is my listener code and avatarmetadata event sent to the roster

Adding a listener to the PepManager

PepManager pepManager = PepManager.getInstanceFor(connection);
pepManager.addPepEventListener(AvatarMetadata.NAMESPACE, AvatarMetadata.class, new PepAvatarListener2());

Here is the event sent to the roster

<message from="pubsub.server" to="andrew@server" id="QYjC6l8V">
      <event xmlns="http://jabber.org/protocol/pubsub#event">
        <items node="urn:xmpp:avatar:metadata">
          <item id="044f23d5896e1432cd4ae2de01629b8302ddc16e">
            <metadata xmlns="urn:xmpp:avatar:metadata">
              <info id="044f23d5896e1432cd4ae2de01629b8302ddc16e" type="image/png" bytes="85005" width="400" height="370"/>
            </metadata>
          </item>
        </items>
      </event>
      <headers xmlns="http://jabber.org/protocol/shim">
        <header name="SubID">
          4HpYQOYjixA1jExml7NGgZXo7sw4smoNnAW6TVbK
        </header>
        <header name="SubID">
          vVzcFh7v65FCKQPSZ41xAnwybVpbPGfflqTmxq49
        </header>
        <header name="SubID">
          CuIrlSuLtYj9oQLYdbrW8pr37FjO4E50M8TOuCH5
        </header>
      </headers>
    </message>

Please help

I fear that I can only suggest to attach a debugger and follow the processing chain of the incoming message that carries the PEP notification to determine where the notification gets lost.

Thanks @Flow for your quick response and suggestion, I attached a debugger but a breakpoint only in the listener. Let me add one dipper beyond the listener.

I think you may want to place the breakpoint way earlier in the processing chain.

There was a bug in some OF releases last year until [OF-2337] PEP publishing fails after reboot - Ignite Realtime Jira was merged… which prevents OF to push events to some subscribers / roster contacts… you should also check if you have a OF version with this bug installed

Thanks @totzkotz , I have got mu Openfire updated to the latest version.

When I face such issues I always try to run same code on different XMPP server, just to be sure it is not something in the server that is broken

To be fair, you maybe wouldn’t need to test with a different server implementation by setting SmackConfiguration.DEBUG to true would have probably revealed that the notification was never received by the client (assuming that is what happened).

At the moment the notification is received by the client, challenge is, it’s not delivered to the PepEventListener

For clarity when adding a PepEventListener, three parameters are required, (String node, Class extensionElementType, PepEventListener pepEventListener)

PepManager pepManager = PepManager.getInstanceFor(connection);
pepManager.addPepEventListener(AvatarMetadata.NAMESPACE, AvatarMetadata.class, new PepAvatarListener2());

My question, is parameter “String node” for nodeId or node title…?

What is a “node title”? I believe in PubSub nodes haven an ID, but not an title.

This topic was automatically closed 62 days after the last reply. New replies are no longer allowed.