我的应用与1.5.8版本有spring-boot-starter-artemis
依赖关系。外部Artemis服务器使用2.6.0。一个应用程序正在向地址发布消息: tacocloud.order.queue :
@Configuration
public class ApplicationConfiguration {
@Bean
public Destination orderQueue() {
return new ActiveMQQueue("tacocloud.order.queue");
}
}
第一个应用的服务层:
@Service
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class JmsOrderMessagingService implements OrderMessagingService {
private final JmsTemplate jmsTemplate;
private final Destination destination;
@Override
public void sendOrder(Order order) {
jmsTemplate.send(destination, session -> {
Message message = session.createObjectMessage(order);
message.setStringProperty("X_ORDER_SOURCE", "WEB");
return message;
});
}
}
第二个应用正在侦听地址:tacocloud.order.queue
@RestController
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class OrderReceiver {
private final JmsTemplate jmsTemplate;
@GetMapping("/new/message")
public Message receiveOrder() {
return jmsTemplate.receive("tacocloud.order.queue");
}
}
虽然要侦听的指定地址是 tacocloud.order.queue ,但在Artemis管理控制台中,它会注册为 jms.queue.tacocloud.order.queue 。
问题:如何让2个应用听到对方的声音?
答案 0 :(得分:1)
您需要:
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="bottomSheetDialogTheme">@style/AppBottomSheetDialogTheme</item>
</style>
<style name="AppBottomSheetDialogTheme"
parent="Theme.Design.Light.BottomSheetDialog">
<item name="bottomSheetStyle">@style/AppModalStyle</item>
</style>
<style name="AppModalStyle"
parent="Widget.Design.BottomSheet.Modal">
<item name="android:background">@drawable/rounded_dialog</item>
</style>
(例如spring-boot-starter-artemis
)。2.0.3.RELEASE
。从2.4.0升级时,这在the Artemis documentation中有所说明。