Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/endersonmaia/advpl-stomp
TOTVS ADVPL STOMP protocol implementation
https://github.com/endersonmaia/advpl-stomp
advpl stomp stompclient totvs
Last synced: 19 days ago
JSON representation
TOTVS ADVPL STOMP protocol implementation
- Host: GitHub
- URL: https://github.com/endersonmaia/advpl-stomp
- Owner: endersonmaia
- License: mit
- Created: 2017-12-22T14:33:01.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-07-14T21:21:16.000Z (over 6 years ago)
- Last Synced: 2023-08-27T10:21:34.159Z (over 1 year ago)
- Topics: advpl, stomp, stompclient, totvs
- Language: xBase
- Homepage:
- Size: 91.8 KB
- Stars: 3
- Watchers: 3
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# advpl-stomp
Library for ADVPL that implements STOMP messaging protocol (http://stomp.github.io).
## Goals
These are the initial goals of this library
- Build and validates a message;
- Send messages to STOMP Server;
- Parse STOMP server responses;
- Learn ADVPL programming;
- Get rich :moneybag: ;## How-to Use it
With this version, you can build and send basic STOMP Client Frames. Subscribing to STOMP queues isn't working at the moment.
````xbase
#include 'totvs.ch'
#include 'stomp.ch'USER FUNCTION STOMP
LOCAL oStompClient, oLogger
oLogger := Logger():New( 'ADVPL-STOMP' )
oStompClient := TStompClient():new("127.0.0.1", 61613, "user", "password", "vhost")
oStompClient:connect()IF ( oStompClient:isConnected() )
oLogger:Info( "Connected to 127.0.0.1" )oStompClient:publish( "/queue/advpl", "First message from ADVPL!" )
oStompClient:subscribe( "/queue/advpl-stomp", "auto", , {|msg, oFrame| oLogger:Info("Mensagem : {1} {2}", { msg, oFrame:getHeaderValue("message-id") } ) } )
oStompClient:disconnect()
ELSE
oLogger:Error( "Failed to connect" )
ENDIF
RETURN
````# License
The MIT License (MIT)
Copyright (c) 2014 Enderson Maia
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.