骆驼不发布到RabbitMq队列(Camel not publishing to RabbitMq queue)
我在Camel的一个routeContext中定义了一个简单的路由(这条路由将用于多个路由)。
<route id="sendToRabbitQueue"> <from uri="direct:sendToQueue" /> <convertBodyTo type="java.lang.String"/> <setHeader headerName="rabbitmq.ROUTING_KEY"> <constant>my.routing.key</constant> </setHeader> <to uri="ref:genericRabbitEndpoint"/> </route>
我有一个端点(在一个端点文件中定义)
<endpoint id="genericRabbitEndpoint" uri="rabbitmq://${rabbitmq.host}:${rabbitmq.port}/${rabbitmq.exchange.name}"> <camel:property key="autoDelete" value="false" /> <camel:property key="connectionFactory" value="#rabbitConnectionFactory" /> </endpoint>
是的 - 我已经看到了http://camel.apache.org/rabbitmq.html页面 - 这是我的想法在交换机上设置标题的位置。但是,没有消息正在发布在队列中。 我清楚地忽略了一些东西,任何帮助将不胜感激。
I have a simple Route defined in a routeContext in Camel (this Route will be used in multiple routes).
<route id="sendToRabbitQueue"> <from uri="direct:sendToQueue" /> <convertBodyTo type="java.lang.String"/> <setHeader headerName="rabbitmq.ROUTING_KEY"> <constant>my.routing.key</constant> </setHeader> <to uri="ref:genericRabbitEndpoint"/> </route>
And I have an endpoint (defined in an endpoints file)
<endpoint id="genericRabbitEndpoint" uri="rabbitmq://${rabbitmq.host}:${rabbitmq.port}/${rabbitmq.exchange.name}"> <camel:property key="autoDelete" value="false" /> <camel:property key="connectionFactory" value="#rabbitConnectionFactory" /> </endpoint>
Yes - I have seen the http://camel.apache.org/rabbitmq.html page - that's where I got the idea to set the header on the exchange.However no message is being published on the queue. I'm clearly overlooking something and any help would be appreciated.
原文:https://stackoverflow.com/questions/32380661
最满意答案
你可以像Mike King建议的那样做,只记得设置背景大小以便覆盖:
background-size: cover;
无论图像大小如何,这都将确保背景始终覆盖所有元素。
另一件事可能是元素没有占据视口的所有高度。 这可以通过设置相对于视口的高度来修复,如:
body { height: 100vh; background-image: url(assets/images/stardust.png); background-size: cover; }
You can do as Mike King suggest, just remember to set the background size to cover aswell:
background-size: cover;
This will make sure the background will always cover all of it's element, no matter what size the image is.
Another thing could be the element is not taking all of the height of the viewport. This can be fixed by setting the height relative to the viewport like:
body { height: 100vh; background-image: url(assets/images/stardust.png); background-size: cover; }
相关问答
更多-
在linux系统中 启动配置网卡的界面用什么命令[2022-02-09]
setup -
下列中不属于面向对象的编程语言的是?[2022-05-30]
a -
我会说这是使用组件状态的好例子。 此外,避免从render方法发出远程请求是个好主意,因为每次组件重新渲染时都会调用它。 要发出请求,我会修改getAvatar函数,将结果写入state。 getAvatar(buyerId){ Meteor.call('getUserPicture', buyerId, (err, res)=>{ if(err){ console.log(err); return err; } else{ console.l ...
-
如何使我的对话全屏?(How to make my dialog fullscreen?)[2024-03-08]
请尝试使用dialogFragment。 在其中使用以下代码 public class myDialog extends DialogFragment { @Override public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setStyle(DialogFragment.STYLE_NORMAL, R.style.NewDialog); } 并将 ... -
流星反应管理员设置(Meteor-react Admin Setup)[2023-01-18]
您在Meteor.users.find()中使用count而不是count()。count() You are using count instead of count() in Meteor.users.find().count() -
“找不到方法handlerSubscriber”就是说你的方法。 请导入服务器目录中的方法文件。 调用方法'handleSubscriber'时出现异常错误:匹配错误:预期对象,得到null 这是您获得的异常,因为订阅者需要是一个对象,但您从客户端发送null。 检查函数抛出此异常。 "method handlerSubscriber not found" is say that your method. Please import the methods file in the server direct ...
-
你可以像Mike King建议的那样做,只记得设置背景大小以便覆盖: background-size: cover; 无论图像大小如何,这都将确保背景始终覆盖所有元素。 另一件事可能是元素没有占据视口的所有高度。 这可以通过设置相对于视口的高度来修复,如: body { height: 100vh; background-image: url(assets/images/stardust.png); background-size: cover; } You can do as ...
-
如果你在createContainer包装App ,那么App将有一个prop currentUser 。 然后, App可以将currentUser prop传递给您的所有组件。 如果你发现自己过多地传递了currentUser ,那么你只能在createContainer包装需要currentUser的组件。 在这种情况下,您将拥有HeaderContainer , SidebarContainer等,每个都包含createContainer 。 If you wrap App in createCon ...
-
是的,这很正常。 您需要查看componentWillReceiveProps() 。 将nextProps与this.props进行比较并设置状态。 Yes, it's normal. You need to look at componentWillReceiveProps(). Compare nextProps with this.props and set the state.
-
如何在模拟器中制作全屏(How to make fullscreen in simulator)[2023-10-20]
这是你需要做的 1)由于您没有在启动图像资源中添加图像,因此您的视图未显示属性2)首先,您需要以下列格式重命名图像 Default-568h@2x~iphone.png - 2x for 5s,5 Default@2x~iphone.png - 6x的2x Default @ 3x~iphone.png -3x for 6+ 2)现在只需拖放您想要支持的特定分辨率的图像,并将创建的LaunchImage资源设置为源。 3) 添加启动图像文档 Here is what you need to do 1) As ...