Problem with Notifications

I am trying to build an application in Java that uses "Notifications". I am following the instructions here "Routing Queue Membership Notifications" as example https://developer.inindca.com/api/tutorials/routing-queue-membership-notification/index.html?language=java&step=1

But it doesn´t work for me. The "class QueueMemberEventListener" gives always two errors:

  1. cannot find symbol "MyQueueUserEventTopicQueueMember"
  2. QueueMemberEventListener is not abstract and does not override abstract method getEventBodyClass() in NotificationListener

Must this class "MyQueueUserEventTopicQueueMember" be created separately?

When that tutorial was created there was a bug in QueueUserEventTopicQueueMember causing the event body to be deserialized incorrectly so I made a modified version of the class.

I've just checked that the bug has since been fixed so if you use the latest version of the SDK (98.0.0) you can use QueueUserEventTopicQueueMember instead of MyQueueUserEventTopicQueueMember.

I'll update the tutorial to reflect the change.

Thank you very much Ronan.
This solves the problem.
I am facing other problems in the code, and I am trying to fix them. I will let you know them later on.

It looks like there is something wrong in the event, "eventBodyRaw" comes with some the information (i.e: user id, etc..), but then eventBody memberId, name, etc are empty

By the way, I have changed
String id = member.getId();
for
String id = member.getMemberId()

You might have an older version of the SDK. Check that your version of QueueUserEventTopicQueueMember matches the current QueueUserEventTopicQueueMember.
The eventBody doesn't contain the values you highlighted above so QueueUserEventTopicQueueMember was updated to reflect the actual properties.

This is my variable state when I break on the same line:

Fine.
I have updated the SDK to the last verion 98.0.0 and it works fine now

Thank you Ronan!

1 Like

Friendly reminder that the dev forum is for customers; employees should use internal channels for support (i.e. servops)

Ok. I'll do that from now on.
Thanks Tim

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