![](/img/trans.png)
[英]Is there a performance difference between creating startup queues vs dynamic queue in ActiveMQ?
[英]Hazelcast queue configuration of dynamic queues
我有一个创建动态队列的系统。 这些队列在消息类型上都相似。
我需要队列中的持久性,所以我实现了一个QueueStore。 问题是要设置持久性,我需要知道队列的名称,并且名称是动态的。 有没有办法给所有队列相同的配置? 更好的是必须基于队列名称的某种模式进行不同的配置。
到目前为止,这就是我所拥有的。
final QueueStoreConfig queueStoreConfig = new QueueStoreConfig()
.setFactoryImplementation(
(name, properties) -> new GenericQueueStore(name, properties)
);
final QueueConfig myQueueConfig = new QueueConfig()
.setName("myQueue")
.setQueueStoreConfig(queueStoreConfig);
final QueueConfig myQueueConfig2 = new QueueConfig()
.setName("myQueue2")
.setQueueStoreConfig(queueStoreConfig);
return new Config()
.addQueueConfig(myQueueConfig)
.addQueueConfig(myQueueConfig2);
要使用相同的配置来配置多个数据结构,您可以按照文档中的说明使用config wildcards
和命名模式: http : //docs.hazelcast.org/docs/3.6/manual/html-single/index.html#using-通配符
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.