In-App-Messaging > Stomp Notification Example/Help 03.06.2015 08:56 AM
I am attempting to use the STOMP push notification feature, both with the SDK API and the web coded version. The web app is written in C# using asp.net. I am trying to create a listener connected to the notification connection provided by the GetNotificationConnection method.
I have tried using Apache.NMS.Stomp and Apache.NMS and just cannot seem to get it to connect. I cannot use websockets such as websocket4net as this will be on a SBS 2011 server that does not support WebSockets (as per the websocket4net documentation).
I am looking for a code example that will connect to the notification service. Below is the code I have tried and I get a "Message "Error connecting to encprodsockjs.att.net:-1." string" error.
connection.Start(); consumer.Listener += new MessageListener(OnMessage);
I have tried different iterations for the Uri > ssl:, stomp:ssl, no preface, using the full Uri, stripping https off the Uri, etc. The code fails at the factory.CreateConnection line with various results such as https not supported, error connecting to, etc.
There is very little documentation about using Apache.NMS.Stomp or any other STOMP client that will run on the server. I don't know enough about Java to have a Java server running.
The ultimate goal is to have the listener on the server, then using SignalR notify the web clients of an update and refresh their page thus minimizing the calls to the AT&T server.