没有任何数据可供显示
开源项目社区 | 当前位置 : |
|
www.trustie.net/open_source_projects | 主页 > 开源项目社区 > simple-mq |
simple-mq
|
1 | 0 | 0 |
贡献者 | 讨论 | 代码提交 |
SimpleMQ is a simple persistent or in-memory message queue written i Java. Simple to use and config. SimpleMQ can also expose a message queue to clients on the network.
Create a new queue (or get a reference to an already existing queue):
MessageQueue queue = MessageQueueService.getMessageQueue("test");Send a simple String message:
queue.send(new MessageInput("hello"))Or send a Serializable object:
queue.send(new MessageInput().setObject("there"));Receive a message:
Message msg = queue.receive();Delete the message:
queue.delete(msg);Delete the queue:
MessageQueueService.deleteMessageQueue("test")That's it.
Java DocPlease read the JavaDoc for more information.
Other examplesPlease take a look at other examples in the simple-mq-examples project. It contains a Spring-remoting example and some simpler examples.
PersistentExample.java
SimpleInMemoryExample.java
a Spring-remoting example
DependenciesIf you dont use Maven, then you will have to download the following and add the jars to your classpath:
commons-logging 1.1.x hsqldb 1.8.x
MavenThis project uses Maven. read more...