mod-stomp-io

Asynchronous STOMP bus module for Vert.x

Лицензия

Лицензия

Группа

Группа

com.jetdrone
Идентификатор

Идентификатор

mod-stomp-io
Последняя версия

Последняя версия

1.1.2
Дата

Дата

Тип

Тип

jar
Описание

Описание

mod-stomp-io
Asynchronous STOMP bus module for Vert.x
Ссылка на сайт

Ссылка на сайт

https://github.com/pmlopes/mod-stomp-io
Система контроля версий

Система контроля версий

https://github.com/pmlopes/mod-stomp-io.git

Скачать mod-stomp-io

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.jetdrone/mod-stomp-io/ -->
<dependency>
    <groupId>com.jetdrone</groupId>
    <artifactId>mod-stomp-io</artifactId>
    <version>1.1.2</version>
</dependency>
// https://jarcasting.com/artifacts/com.jetdrone/mod-stomp-io/
implementation 'com.jetdrone:mod-stomp-io:1.1.2'
// https://jarcasting.com/artifacts/com.jetdrone/mod-stomp-io/
implementation ("com.jetdrone:mod-stomp-io:1.1.2")
'com.jetdrone:mod-stomp-io:jar:1.1.2'
<dependency org="com.jetdrone" name="mod-stomp-io" rev="1.1.2">
  <artifact name="mod-stomp-io" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.jetdrone', module='mod-stomp-io', version='1.1.2')
)
libraryDependencies += "com.jetdrone" % "mod-stomp-io" % "1.1.2"
[com.jetdrone/mod-stomp-io "1.1.2"]

Зависимости

test (3)

Идентификатор библиотеки Тип Версия
io.vertx : testtools jar 2.0.3-final
junit : junit jar 4.11
com.rabbitmq : amqp-client jar 3.3.4

Модули Проекта

Данный проект не имеет модулей.

Stomp busmod for Vert.x

Build Status

This module allows communcation between Message brokers such as ActiveMQ, RabbitMQ Apache Apollo.

Support the development of this module

Click here to lend your support to: Support com.jetdrone Vert.x modules and make a donation at www.pledgie.com !

Quick and Dirty Guide:

First deploy the module:

eb = vertx.eventBus()
container.deployModule('com.jetdrone~mod-stomp-io~1.1.2', [address: 'my-address'], 1)

The config json accepts the following optional parameters:

  • "host" default: "localhost"
  • "port" default 61613
  • "login" default null
  • "passcode" default: null

Second send/receive messages:

eb.send(address, [command: "send", destination: "/queue/FOO.BAR", body: "Hello, queue FOO.BAR"]) { reply ->
    if (reply.body.status == 'OK') {
        // ...
    }
}

// sync messages (wait for ACK)
eb.send(address, [command: "send", destination: "/queue/FOO.BAR", body: "Hello, queue FOO.BAR", sync: true]) { reply ->
    if (reply.body.status == 'OK') {
        // ...
    }
}

Work pub/sub mode:

    // register a handler for the incoming message
    eb.registerHandler("${address}/queue/unsub", new Handler<Message<JsonObject>>() {
        @Override
        void handle(Message<JsonObject> received) {
            def value = received.body.getField('value')
            assertNotNull(value)
            testComplete()
        }
    });

    eb.send(address, [command: "send", destination: "/queue/unsub", body: "Hello, queue unsub"]) { reply0 ->
        stomp([command: "subscribe", destination: "/queue/unsub"]) { reply1 ->
            def id = reply1.body.getString("id")

            // sleep 1 second to avoid receiving any old intransit messages
            vertx.setTimer(1000, new Handler<Long>() {
                @Override
                public void handle(Long event) {
                    stomp([command: "unsubscribe", id: id]) { reply2 ->
                        testComplete()
                    }
                }
            });
        }
    }

Версии библиотеки

Версия
1.1.2
1.1.1
1.1.0
1.0.2
1.0.1
1.0.0
1.0.0-beta3
1.0.0-beta2
1.0.0-beta1