在Kafka中,我想只使用单个代理,单个主题和一个具有一个生产者和多个消费者的分区(每个消费者从代理获得自己的数据副本).鉴于此,我不希望使用Zookeeper的开销; 我不能只使用经纪人吗?为什么动物园管理员必须?
partitioning producer-consumer broker apache-kafka apache-zookeeper
我正在考虑将mosquitto作为MQTT经纪人.根据我的阅读,我意识到Mosquitto不支持水平缩放.
到目前为止,我的要求的所有其他标准都可以通过Mosquitto来满足.
我不确定这个问题是否过于通用或广泛,但我想知道的是,如果有任何方法可以实现扩展功能,还可以为Mosquitto实现负载平衡等.
因此我们决定在迁移到微服务架构时使用RabbitMQ作为消息/事件总线,但我们无法找到关于排队的最佳方式的明确答案,我们有两种选择:
一个主要交换机将是Fanout交换机,它又将消息传递到主队列以进行日志记录和其他目的,另一个子交换机将是主题交换并使用消息路由键将消息路由到每个所需队列.我们期望子交换机后面的队列数量是多少.这可以用这个图解释:
一个主交换,它将是一个主题交换,仍有一个主队列使用"#"路由密钥绑定到该交换.该主交换还将处理到其他子交换的主路由,因此路由密钥可能是"协议.#","赋值.#","消息.#",然后用于绑定多个主题子交换,每个都将处理子路由,因此一个子交换可能正在处理所有"赋值",绑定到该交换的队列可能被路由密钥绑定,如"assignments.accepted","assignments.deleted"......在这种情况下,我们感觉像每次交换的队列数量都会减少,它们会以某种方式在交换之间分配.
那么,哪种方案可能是最好的方法呢?RabbitMQ更快,开销更少.
请记住,所有队列,交换和绑定都将从即将发布或订阅的服务中即时完成.
我正在尝试启动ActiveMQ 5.11,我看到WARNING
如下:
WARN | Transport Connection to: tcp://127.0.0.1:40890 failed: java.io.EOFException
Run Code Online (Sandbox Code Playgroud)
我activemq.xml
的如下:
<transportConnectors>
<transportConnector name="openwire" uri="tcp://0.0.0.0:${JMS_PORT}" />
<transportConnector name="stomp" uri="stomp://0.0.0.0:${JMS_STOMP_PORT}"/>
<transportConnector name="ssl" uri="ssl://0.0.0.0:${JMS_SSL_PORT}"/>
</transportConnectors>
<sslContext>
<sslContext
keyStore="file:${JMS_KEY_STORE}"
keyStorePassword="${JMS_KEY_STORE_PASSWORD}"
trustStore="file:${JMS_TRUST_STORE}"
trustStorePassword="${JMS_TRUST_STORE_PASSWORD}"
/>
</sslContext>
<networkConnectors>
<networkConnector
name="host1 and host2"
uri="static://(${JMS_X_SITE_CSV_URL})?wireFormat=ssl&wireFormat.maxInactivityDuration=30000"
dynamicOnly="true"
suppressDuplicateQueueSubscriptions = "true"
networkTTL="1"
/>
</networkConnectors>
Run Code Online (Sandbox Code Playgroud)
这是整个控制台日志.
Java Runtime: Oracle Corporation 1.7.0_05 /usr/java/jdk1.7.0_05/jre
Heap sizes: current=1004928k free=994439k max=1004928k
JVM args: -Xmx1G -Dorg.apache.activemq.UseDedicatedTaskRunner=true -Djava.util.logging.config.file=logging.properties -Djava.security.auth.login.config=/home/dragon/activemq/conf/login.config -Dcom.sun.management.jmxremote -Djava.io.tmpdir=/home/dragon/activemq/tmp -Dactivemq.classpath=/home/dragon/activemq/conf; -Dactivemq.home=/home/dragon/activemq -Dactivemq.base=/home/dragon/activemq -Dactivemq.conf=/home/dragon/activemq/conf -Dactivemq.data=/home/dragon/activemq/data
Extensions classpath:
[/home/dragon/activemq/lib,/home/dragon/activemq/lib/camel,/home/dragon/activemq/lib/optional,/home/dragon/activemq/lib/web,/home/dragon/activemq/lib/extra]
ACTIVEMQ_HOME: /home/dragon/activemq
ACTIVEMQ_BASE: /home/dragon/activemq …
Run Code Online (Sandbox Code Playgroud) 为了扩展TWX应用程序,必须遵循哪些体系结构和应用程序开发最佳实践?
大多数应用程序从少量设备开始,但随着时间的推移,它们可以快速构建数千台设备.一旦TWX实例的流量太大,应遵循什么策略?当前端被用户数量淹没时,同样的问题也适用.
嘿大家,我想知道如何在python中开始编写Etrade交易股票的界面.我正在尝试制作一个自动交易机器人,但是没有api公开可用于Etrade的自动交易.提前致谢.^^
将 mac OS 更新到Catalina 10.15.4 和 XCode 11.4 以及 VS 2019 16.5.1后
,我无法从 VS 与 mac 配对,VS 中出现错误:
“尝试启动 Broker 时发生错误... ”。
日志文件中的信息:
“无法安装代理。
已建立与“192.168.233.1”的连接...
服务器从 ConnectingState 更改为 DisconnectingState 到 192.168.233.1 (192.168.233.1)。正在
从 192.168.233.1 断开连接...
服务器从 DisconnectingState 更改为 DisconnectedState 到 192.168.233.1 (192.168.233.1)。
已建立与“192.168.233.1”的连接。
尝试启动 Broker 时发生错误...
客户端 vs - 30 秒内没有发送数据包。正在
发送 Ping到服务器来维持“Keep Alive”
我认为连接 macOS 的问题,因为
Apple 将 bash 替换为 zsh 作为 macOS Catalina 中的默认 shell。
我尝试执行后续步骤来解决该问题:
1) 删除 Mac 和 Windows 上的 XMA 文件夹: …
大家早,
我最近一直在与spring-boot-artemis-starter挣扎.我对它的spring-boot支持的理解如下:
spring.artemis.mode=embedded
,和tomcat一样,spring-boot将实现通过tcp(服务器模式)可访问的代理.以下命令应该成功:nc -zv localhost 61616
spring.artmis.mode=native
和spring-boot只会根据spring.artemis.*
属性(客户端模式)配置jms模板.客户端模式可以在我的机器上使用独立的artemis服务器.不幸的是,我无法在服务器模式下到达tcp端口.
如果有人确认我对嵌入式模式的理解,我将不胜感激.
感谢您的旅行帮助
经过一番挖掘后,我注意到spring-boot-starter-artemis开箱即用的实现使用了org.apache.activemq.artemis.core.remoting.impl.invm.InVMAcceptorFactory
acceptor.我想知道这不是根本原因(我再也不是专家).但似乎有一种方法可以自定义artemis配置.因此我尝试了以下配置而没有任何运气:
@SpringBootApplication
public class MyBroker {
public static void main(String[] args) throws Exception {
SpringApplication.run(MyBroker.class, args);
}
@Autowired
private ArtemisProperties artemisProperties;
@Bean
public ArtemisConfigurationCustomizer artemisConfigurationCustomizer() {
return configuration -> {
try {
configuration.addAcceptorConfiguration("netty", "tcp://localhost:" + artemisProperties.getPort());
} catch (Exception e) {
throw new RuntimeException("Failed to add netty transport acceptor to artemis instance");
}
};
}
}
Run Code Online (Sandbox Code Playgroud) 由于指定clienID
仅在类的特征MqttAndroidClient
,和使用类时不能指定IMqttClient
和IMqttAsynchClient
.
连接客户端的唯一目的是ID
什么?
broker ×10
java ×2
mqtt ×2
android ×1
apache-kafka ×1
automation ×1
event-bus ×1
frontend ×1
iot ×1
macos ×1
message ×1
mosquitto ×1
paho ×1
partitioning ×1
python ×1
rabbitmq ×1
scalability ×1
spring-boot ×1
stocks ×1
thingworx ×1
trading ×1
xamarin ×1
zsh ×1