Products | Versions |
---|---|
TIBCO Streaming | 10.6 and later |
This article provides a working RabbitMQ adapter configuration example. To test this configuration, you may run a local RabbitMQ message broker as described below.
$ docker pull rabbitmq:3-management $ docker run -d --hostname localhost --name some-rabbit -p 5672:5672 -p 8080:15672 rabbitmq:3-managementThis exposes ports 5672 (for the broker) and 8080 (for the management console) to your host machine. You should now be able to login to the RabbitMQ management console. In your web browser, confirm that you can successfully login to http://localhost:8080 (supplying the username 'guest' and password 'guest').
name = "RabbitMQ.conf" type = "com.tibco.ep.streambase.configuration.adapter" version = "1.0.0" configuration = { AdapterGroup = { adapters = { RabbitMQServers = { sections = [ { name = "RabbitMQServer" settings = { ConnectOnStartup = "true" Host = "localhost" Password = "guest" Username = "guest" id = "RabbitMQ" Port = "5672" } } ] } } } }Finally, confirm the adapter configuration by running the HelloWorld.sbapp fragment under src/main/eventflow/. This should successfully connect to the RabbitMQ broker and create the 'hello' queue. You can expect to see the following output in the Studio Console view:
(fragment deploy): 2021-10-13 15:21:46.984000-0400 [26512:runtime [tid=26656]] INFO Consumer: Action: connected Object: amqp://guest@0:0:0:0:0:0:0:1:5672/ Message: Connected successfully (fragment deploy): 2021-10-13 15:21:47.002000-0400 [26512:runtime [tid=26656]] INFO Consumer: Action: queue Object: hello Message: Queue connected (fragment deploy): 2021-10-13 15:21:47.011000-0400 [26512:runtime [tid=26656]] INFO Consumer: Action: channel Object: 1 Message: Channel created successfully (fragment deploy): 2021-10-13 15:21:47.011000-0400 [26512:runtime [tid=26656]] INFO Producer: Action: connected Object: amqp://guest@0:0:0:0:0:0:0:1:5672/ Message: Connected successfully (fragment deploy): 2021-10-13 15:21:47.015000-0400 [26512:runtime [tid=26656]] INFO Producer: Action: queue Object: hello Message: Queue connected (fragment deploy): 2021-10-13 15:21:47.015000-0400 [26512:runtime [tid=26656]] INFO Producer: Action: channel Object: 2 Message: Channel created successfully