-
Notifications
You must be signed in to change notification settings - Fork 28
Queue
linsen edited this page May 29, 2020
·
13 revisions
Support for RabbitMQ and the other MQ based amqp2.0 protocol.
application.conf
bool enabled = false;
string host = "127.0.0.1";
string username = "guest";
string password = "guest";
ushort port = 5672;
uint timeout = 15000;
- producer
string message = "hello world";
AbstractQueue queue = messageQueue();
queue.push("my-queue", cast(ubyte[])message);
- consumer
string ChannelName = "my-queue";
AbstractQueue queue = messageQueue();
queue.addListener(ChannelName, (ubyte[] message)
{
string msg = cast(string)message;
writeln("Received message: %s", msg);
});