Genysys Java PSDK - setup Eventhandler for web application

85 Views Asked by At

I am setting up Genysys PSDK to connect to tServer and listen to events using handler. I have created

MessageHandler

to receive messages but looks like its not working somehow. Genesys Document states that we need to implement AsyncInvoker in order to receive events.

Can someone help me how can I setup AsyncInvoker when working with spring boot application?

Important: You need to know that your event-handling logic will be executed by using the protocol invoker. Please set the invoker appropriate for your application needs.

1

There are 1 best solutions below

0
On

I was opening tserver connection before setting handler. Setting

      tserver.setMessageHandler(new MessageHandler() {
            @Override
            public void onMessage(Message arg0) {
                // TODO Auto-generated method stub
                System.out.println("Message Handler" + arg0.toString());
            }
        });

before opening connection worked for me.