dot.r Stomp announcement - Forum - OpenEdge Development - Progress Community
 Forum

dot.r Stomp announcement

  • Following on from presentations in Boston and Finland, dot.r is pleased to announce the open source Stomp project, available immediately.

    Download  from either http://www.dotr.com or https://bitbucket.org/jmls/stomp , the dot.r stomp programs allow you to connect your progress session to any other application or service

    that is connected to the same message broker.

    Open source , free message brokers that support Stomp are :

    Fuse (http://fusesource.com/products/fuse-mq-enterprise/) [a Progress company now owned by Red Hat inc]

    ====

    Fuse MQ Enterprise is a standards-based, open source messaging platform that deploys with a very small footprint. The lack of license fees combined with high-performance, reliable messaging that can be

    used with any development environment provides a solution that supports integration everywhere

    ActiveMQ (http://activemq.apache.org/)

    =======

    Apache ActiveMQ (tm) is the most popular and powerful open source messaging and Integration Patterns server. Apache ActiveMQ is fast, supports many Cross Language Clients and

    Protocols, comes with easy to use Enterprise Integration Patterns and many advanced features while fully supporting JMS 1.1 and J2EE 1.4.

    Apache ActiveMQ is released under the Apache 2.0 License

    RabbitMQ

    =======

    RabbitMQ is a message broker. The principal idea is pretty simple: it accepts and forwards messages. You can think about it as a post office: when you send mail to the post box you're pretty sure that Mr.

    Postman will eventually deliver the mail to your recipient. Using this metaphor RabbitMQ is a post box, a post office and a postman.

    The major difference between RabbitMQ and the post office is the fact that it doesn't deal with paper, instead it accepts, stores and forwards binary blobs of data - messages.

    --------------------------------

    Please feel free to log any issues on the https://bitbucket.org/jmls/stomp issue system, and fork the project in order to commit back all those new features that you are going to add ...

    dot.r Stomp uses the permissive MIT licence (http://en.wikipedia.org/wiki/MIT_License)

    Have fun, enjoy !

    Julian

  • Hi Julian,

    I had troubles installing ActiveMQ 5.6.0 on Windows 7 (64 bit).

    You may want to also include this link "http://stackoverflow.com/questions/4626824/how-do-i-install-activemq-as-a-64-bit-service-on-windows" in your notes, it helped overcome this issue.

    Cheers

    David

    P.S. Thanks for sharing... time to play!

  • I will do so, many thanks for the heads up.

    Any issues, drop me a line.

    Julian

  • Hi Julian,

    Found a couple of issues and have some suggestions for improvement. Whats the best way to send that info to you?

    Thanks

    David

  • fantastic.

    By far, the best way would be to fork, make your changes to your

    repository, and then create a pull request for me to merge into the

    main repository

    have a look at https://confluence.atlassian.com/display/BITBUCKET/Forkingabitbucket+Repository

    Thanks very much !

    Julian

  • Done.

    Be gentle, its my first fork! (haha sorry, coldn't help myself! )

    David.

  • grin

  • Hi Julian,

    This is interesting stuff indeed!

    Some minor suggestions:

    - Add a ROUTINE-LEVEL statement to StompClient.cls

    - Add a bracket to the following example on the web page: dotr.Stomp.Helper.SendMessage:ToPersistentQueue("MyQueue","a test message".

    Thank you for your contribution to the OpenEdge community!

    -peter

  • jmls wrote:

    I will do so, many thanks for the heads up.

    Any issues, drop me a line.

    Julian

    Today I got the 'oooop' message:

    IF SocketHandle:BYTES-WRITTEN NE lNumBytes THEN MESSAGE "oooop" VIEW-AS ALERT-BOX.

    What does that indicate?

  • Heh. That means that for some reason, not all of the data was written

    to the server. Very unusual. It can happen if the server crashes or

    shuts down with active clients, or if the server can't process all the

    data in one hit. What size chunks are you sending ? There are various

    options in the ActiveMQ configuration to increase socket data size etc

    I should write some error handling code round that to handle this .

    I will at some stage

    Julian

    On 11 October 2012 13:03, Peter van Dam

  • jmls wrote:

    Heh. That means that for some reason, not all of the data was written

    to the server. Very unusual. It can happen if the server crashes or

    shuts down with active clients, or if the server can't process all the

    data in one hit. What size chunks are you sending ? There are various

    options in the ActiveMQ configuration to increase socket data size etc

    I should write some error handling code round that to handle this .

    I will at some stage

    Julian

    On 11 October 2012 13:03, Peter van Dam

    The chunks are small, and I am only receiving. But there were over 400 queued messages waiting on the server and for some reason they were not being processed by the client.

    The server never faltered. When I closed the client because I noticed it was not processing messages I got the ooops message. I rely on GC when closing the client.

    When I say closing the client I am not closing the OE session, just the menu program that also invokes the listener.

  • Hmm. That error is definitely in the sendframe method of StompConnection.cls

    It could it be that the client connected , tried to subscribe to a queue and then lost the connection before it had a chance to send the subscribe frame. Or that it did connect , and you're sending receipt frames , and it got disconnected at some stage.

    That would explain the server not sending the messages (the client is no longer connected) and the alert-box doesn't allow the client to be GC'd

    try replacing the error message with this block of code and see what happens

    if SocketHandle:bytes-written ne lNumBytes then

    do:

         case true:

              when not valid-handle(SocketHandle) then assign err = "Socket handle invalid".

              when not SocketHandle:connected() then assign err = "Socket is disconnected".

            

              otherwise assign err = substitute("Unexpected write error on socket Bytes written [&1], expected to write [&2:]",SocketHandle:bytes-written, lNumBytes).

         end case.

             

         message err view-as alert-box warning.

    end.

  • OK did that.

    Now we wait

  • this is how the write method looks like in my own socketoutputbuffer... maybe can be easily adapted there

    method override public void write( input bytes as memptr, input offset as integer, input len as integer ):
          if bytes eq ? or offset eq ? or len eq ? then
             undo, throw new NullPointerException().
            
          if len eq 0 then
             return.
         
          if offset lt 0 or len lt 0 or offset + len gt get-size(bytes) then
             undo, throw new ArrayIndexOutOfBoundsException().
         
          checkClosed().
          do while len gt 0:
             outSocket:write(bytes, offset + 1, len) no-error.
             if outSocket:bytes-written eq 0 then
                undo, throw new IOException().
             assign
                offset = offset + outSocket:bytes-written
                len    = len    - outSocket:bytes-written.
          end.
    end method.

  • thanks Marian

    I will do that .