使用 python 浏览在 activemq 中推送的消息:无法调用 "Object.getClass()" 因为 "value" 为空
Browsing message pushed in activemq using python: Cannot invoke "Object.getClass()" because "value" is null
我在 ACS01 队列中有消息是使用 python3 中的 stomp 库推送的,它工作正常,但是当我尝试在 artemis activemq 控制台中浏览相同的消息时,我在日志中遇到以下错误:
2022-03-28 19:53:13,979 WARN [org.apache.activemq.artemis.core.management.impl.QueueControlImpl] Cannot invoke "Object.getClass()" because "value" is null: java.lang.NullPointerException: Cannot invoke "Object.getClass()" because "value" is null
at org.apache.activemq.artemis.api.core.JsonUtil.truncate(JsonUtil.java:339) [artemis-core-client-2.20.0.jar:2.20.0]
at org.apache.activemq.artemis.api.core.Message.toPropertyMap(Message.java:768) [artemis-core-client-2.20.0.jar:2.20.0]
at org.apache.activemq.artemis.core.message.openmbean.MessageOpenTypeFactory.expandProperties(MessageOpenTypeFactory.java:168) [artemis-core-client-2.20.0.jar:2.20.0]
at org.apache.activemq.artemis.core.message.openmbean.MessageOpenTypeFactory.getFields(MessageOpenTypeFactory.java:146) [artemis-core-client-2.20.0.jar:2.20.0]
at org.apache.activemq.artemis.core.message.impl.CoreMessage$BytesMessageOpenTypeFactory.getFields(CoreMessage.java:1377) [artemis-core-client-2.20.0.jar:2.20.0]
at org.apache.activemq.artemis.core.message.impl.CoreMessage$BytesMessageOpenTypeFactory.getFields(CoreMessage.java:1365) [artemis-core-client-2.20.0.jar:2.20.0]
at org.apache.activemq.artemis.core.message.impl.CoreMessage.toCompositeData(CoreMessage.java:1358) [artemis-core-client-2.20.0.jar:2.20.0]
at org.apache.activemq.artemis.core.management.impl.QueueControlImpl.browse(QueueControlImpl.java:1583) [artemis-server-2.20.0.jar:2.20.0]
at jdk.internal.reflect.GeneratedMethodAccessor102.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [java.base:]
at java.base/java.lang.reflect.Method.invoke(Method.java:568) [java.base:]
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:72) [java.base:]
at jdk.internal.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [java.base:]
at java.base/java.lang.reflect.Method.invoke(Method.java:568) [java.base:]
at java.base/sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:262) [java.base:]
at java.management/com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112) [java.management:]
at java.management/com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46) [java.management:]
at java.management/com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237) [java.management:]
at java.management/com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138) [java.management:]
at java.management/com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252) [java.management:]
at java.management/javax.management.StandardMBean.invoke(StandardMBean.java:405) [java.management:]
at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:814) [java.management:]
at java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:802) [java.management:]
at java.base/jdk.internal.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [java.base:]
at java.base/java.lang.reflect.Method.invoke(Method.java:568) [java.base:]
at org.apache.activemq.artemis.core.server.management.ArtemisMBeanServerBuilder$MBeanInvocationHandler.invoke(ArtemisMBeanServerBuilder.java:96) [artemis-server-2.20.0.jar:2.20.0]
at jdk.proxy2/jdk.proxy2.$Proxy16.invoke(Unknown Source)
at org.jolokia.handler.ExecHandler.doHandleRequest(ExecHandler.java:98) [jolokia-core-1.7.0.jar:]
at org.jolokia.handler.ExecHandler.doHandleRequest(ExecHandler.java:40) [jolokia-core-1.7.0.jar:]
at org.jolokia.handler.JsonRequestHandler.handleRequest(JsonRequestHandler.java:89) [jolokia-core-1.7.0.jar:]
at org.jolokia.backend.MBeanServerExecutorLocal.handleRequest(MBeanServerExecutorLocal.java:109) [jolokia-core-1.7.0.jar:]
at org.jolokia.backend.MBeanServerHandler.dispatchRequest(MBeanServerHandler.java:161) [jolokia-core-1.7.0.jar:]
at org.jolokia.backend.LocalRequestDispatcher.dispatchRequest(LocalRequestDispatcher.java:99) [jolokia-core-1.7.0.jar:]
at org.jolokia.backend.BackendManager.callRequestDispatcher(BackendManager.java:429) [jolokia-core-1.7.0.jar:]
at org.jolokia.backend.BackendManager.handleRequest(BackendManager.java:158) [jolokia-core-1.7.0.jar:]
at org.jolokia.http.HttpRequestHandler.executeRequest(HttpRequestHandler.java:197) [jolokia-core-1.7.0.jar:]
at org.jolokia.http.HttpRequestHandler.handlePostRequest(HttpRequestHandler.java:137) [jolokia-core-1.7.0.jar:]
at org.jolokia.http.AgentServlet.handleRequest(AgentServlet.java:493) [jolokia-core-1.7.0.jar:]
at org.jolokia.http.AgentServlet.handleSecurely(AgentServlet.java:383) [jolokia-core-1.7.0.jar:]
at org.jolokia.http.AgentServlet.handle(AgentServlet.java:354) [jolokia-core-1.7.0.jar:]
at org.jolokia.http.AgentServlet.doPost(AgentServlet.java:317) [jolokia-core-1.7.0.jar:]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) [jetty-all-9.4.44.v20210927-uber.jar:9.4.44.v20210927]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [jetty-all-9.4.44.v20210927-uber.jar:9.4.44.v20210927]
at org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1459)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799)
at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1631)
at io.hawt.web.filters.FlightRecordingDownloadFacade.doFilter(FlightRecordingDownloadFacade.java:68) [hawtio-system-2.14.0.jar:2.14.0]
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
at io.hawt.web.auth.LoginRedirectFilter.doFilter(LoginRedirectFilter.java:63) [hawtio-system-2.14.0.jar:2.14.0]
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
at io.hawt.web.auth.AuthenticationFilter.lambda$executeAs(AuthenticationFilter.java:105) [hawtio-system-2.14.0.jar:2.14.0]
at java.base/java.security.AccessController.doPrivileged(AccessController.java:712) [java.base:]
at java.base/javax.security.auth.Subject.doAs(Subject.java:439) [java.base:]
at io.hawt.web.auth.AuthenticationFilter.executeAs(AuthenticationFilter.java:104) [hawtio-system-2.14.0.jar:2.14.0]
at io.hawt.web.auth.AuthenticationFilter.doFilter(AuthenticationFilter.java:72) [hawtio-system-2.14.0.jar:2.14.0]
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
at io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43) [hawtio-system-2.14.0.jar:2.14.0]
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
at io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43) [hawtio-system-2.14.0.jar:2.14.0]
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
at io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43) [hawtio-system-2.14.0.jar:2.14.0]
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
at io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43) [hawtio-system-2.14.0.jar:2.14.0]
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
at io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43) [hawtio-system-2.14.0.jar:2.14.0]
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
at io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43) [hawtio-system-2.14.0.jar:2.14.0]
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
at io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43) [hawtio-system-2.14.0.jar:2.14.0]
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
at io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43) [hawtio-system-2.14.0.jar:2.14.0]
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
at io.hawt.web.auth.SessionExpiryFilter.process(SessionExpiryFilter.java:166) [hawtio-system-2.14.0.jar:2.14.0]
at io.hawt.web.auth.SessionExpiryFilter.doFilter(SessionExpiryFilter.java:60) [hawtio-system-2.14.0.jar:2.14.0]
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:201)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
at org.apache.activemq.artemis.component.JolokiaFilter.doFilter(JolokiaFilter.java:50) [artemis-web-2.20.0.jar:2.20.0]
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1434)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1349)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:59)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.Server.handle(Server.java:516)
at org.eclipse.jetty.server.HttpChannel.lambda$handle(HttpChannel.java:400)
at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:645)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:392)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
at org.eclipse.jetty.io.ChannelEndPoint.run(ChannelEndPoint.java:104)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
at java.base/java.lang.Thread.run(Thread.java:833) [java.base:]
推送消息的代码是-
import time
import sys
import stomp
hosts = [('localhost', 61613)]
class Listener(stomp.ConnectionListener):
def on_error(self, frame):
print('received an error "%s"' % frame.body)
def on_message(self, frame):
print('received an message "%s"' % frame.body)
conn = stomp.Connection(host_and_ports=hosts)
conn.set_listener('', Listener())
conn.connect('aau01', 'aau01', wait=True)
conn.send(destination='ACS01', body='<hello>Red</hello>')
conn.send(destination='ACS01', body='<hello>Blue</hello>')
time.sleep(5)
conn.disconnect()
此外,控制台指示消息仍在队列中(图像的底部窗格 - 1-2,共 2),但不在浏览中显示消息 window -
还需要考虑的另一件事是,当我浏览使用控制台推送的消息时,消息在浏览队列中可见 window。
感谢您的帮助!
存在一个错误,当队列中的其中一封邮件包含 null
属性 值时,该错误会阻止浏览邮件。在这种情况下,代理本身错误地设置了 null
属性 值。一旦可用,您需要升级到 ActiveMQ Artemis 2.21.0,因为它将包含 ARTEMIS-3677 and ARTEMIS-3696. It just passed the release vote 的修复程序,因此它应该在接下来的几天内可以在网站上下载。需要明确的是,这里唯一的问题是浏览消息。您应该可以毫无问题地使用消息。
当您通过 Web 控制台将消息推送到队列时,使用的是核心协议(即不是 STOMP),这就是您可以成功浏览的原因。
我在 ACS01 队列中有消息是使用 python3 中的 stomp 库推送的,它工作正常,但是当我尝试在 artemis activemq 控制台中浏览相同的消息时,我在日志中遇到以下错误:
2022-03-28 19:53:13,979 WARN [org.apache.activemq.artemis.core.management.impl.QueueControlImpl] Cannot invoke "Object.getClass()" because "value" is null: java.lang.NullPointerException: Cannot invoke "Object.getClass()" because "value" is null
at org.apache.activemq.artemis.api.core.JsonUtil.truncate(JsonUtil.java:339) [artemis-core-client-2.20.0.jar:2.20.0]
at org.apache.activemq.artemis.api.core.Message.toPropertyMap(Message.java:768) [artemis-core-client-2.20.0.jar:2.20.0]
at org.apache.activemq.artemis.core.message.openmbean.MessageOpenTypeFactory.expandProperties(MessageOpenTypeFactory.java:168) [artemis-core-client-2.20.0.jar:2.20.0]
at org.apache.activemq.artemis.core.message.openmbean.MessageOpenTypeFactory.getFields(MessageOpenTypeFactory.java:146) [artemis-core-client-2.20.0.jar:2.20.0]
at org.apache.activemq.artemis.core.message.impl.CoreMessage$BytesMessageOpenTypeFactory.getFields(CoreMessage.java:1377) [artemis-core-client-2.20.0.jar:2.20.0]
at org.apache.activemq.artemis.core.message.impl.CoreMessage$BytesMessageOpenTypeFactory.getFields(CoreMessage.java:1365) [artemis-core-client-2.20.0.jar:2.20.0]
at org.apache.activemq.artemis.core.message.impl.CoreMessage.toCompositeData(CoreMessage.java:1358) [artemis-core-client-2.20.0.jar:2.20.0]
at org.apache.activemq.artemis.core.management.impl.QueueControlImpl.browse(QueueControlImpl.java:1583) [artemis-server-2.20.0.jar:2.20.0]
at jdk.internal.reflect.GeneratedMethodAccessor102.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [java.base:]
at java.base/java.lang.reflect.Method.invoke(Method.java:568) [java.base:]
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:72) [java.base:]
at jdk.internal.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [java.base:]
at java.base/java.lang.reflect.Method.invoke(Method.java:568) [java.base:]
at java.base/sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:262) [java.base:]
at java.management/com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112) [java.management:]
at java.management/com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46) [java.management:]
at java.management/com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237) [java.management:]
at java.management/com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138) [java.management:]
at java.management/com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252) [java.management:]
at java.management/javax.management.StandardMBean.invoke(StandardMBean.java:405) [java.management:]
at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:814) [java.management:]
at java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:802) [java.management:]
at java.base/jdk.internal.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [java.base:]
at java.base/java.lang.reflect.Method.invoke(Method.java:568) [java.base:]
at org.apache.activemq.artemis.core.server.management.ArtemisMBeanServerBuilder$MBeanInvocationHandler.invoke(ArtemisMBeanServerBuilder.java:96) [artemis-server-2.20.0.jar:2.20.0]
at jdk.proxy2/jdk.proxy2.$Proxy16.invoke(Unknown Source)
at org.jolokia.handler.ExecHandler.doHandleRequest(ExecHandler.java:98) [jolokia-core-1.7.0.jar:]
at org.jolokia.handler.ExecHandler.doHandleRequest(ExecHandler.java:40) [jolokia-core-1.7.0.jar:]
at org.jolokia.handler.JsonRequestHandler.handleRequest(JsonRequestHandler.java:89) [jolokia-core-1.7.0.jar:]
at org.jolokia.backend.MBeanServerExecutorLocal.handleRequest(MBeanServerExecutorLocal.java:109) [jolokia-core-1.7.0.jar:]
at org.jolokia.backend.MBeanServerHandler.dispatchRequest(MBeanServerHandler.java:161) [jolokia-core-1.7.0.jar:]
at org.jolokia.backend.LocalRequestDispatcher.dispatchRequest(LocalRequestDispatcher.java:99) [jolokia-core-1.7.0.jar:]
at org.jolokia.backend.BackendManager.callRequestDispatcher(BackendManager.java:429) [jolokia-core-1.7.0.jar:]
at org.jolokia.backend.BackendManager.handleRequest(BackendManager.java:158) [jolokia-core-1.7.0.jar:]
at org.jolokia.http.HttpRequestHandler.executeRequest(HttpRequestHandler.java:197) [jolokia-core-1.7.0.jar:]
at org.jolokia.http.HttpRequestHandler.handlePostRequest(HttpRequestHandler.java:137) [jolokia-core-1.7.0.jar:]
at org.jolokia.http.AgentServlet.handleRequest(AgentServlet.java:493) [jolokia-core-1.7.0.jar:]
at org.jolokia.http.AgentServlet.handleSecurely(AgentServlet.java:383) [jolokia-core-1.7.0.jar:]
at org.jolokia.http.AgentServlet.handle(AgentServlet.java:354) [jolokia-core-1.7.0.jar:]
at org.jolokia.http.AgentServlet.doPost(AgentServlet.java:317) [jolokia-core-1.7.0.jar:]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) [jetty-all-9.4.44.v20210927-uber.jar:9.4.44.v20210927]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [jetty-all-9.4.44.v20210927-uber.jar:9.4.44.v20210927]
at org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1459)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799)
at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1631)
at io.hawt.web.filters.FlightRecordingDownloadFacade.doFilter(FlightRecordingDownloadFacade.java:68) [hawtio-system-2.14.0.jar:2.14.0]
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
at io.hawt.web.auth.LoginRedirectFilter.doFilter(LoginRedirectFilter.java:63) [hawtio-system-2.14.0.jar:2.14.0]
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
at io.hawt.web.auth.AuthenticationFilter.lambda$executeAs(AuthenticationFilter.java:105) [hawtio-system-2.14.0.jar:2.14.0]
at java.base/java.security.AccessController.doPrivileged(AccessController.java:712) [java.base:]
at java.base/javax.security.auth.Subject.doAs(Subject.java:439) [java.base:]
at io.hawt.web.auth.AuthenticationFilter.executeAs(AuthenticationFilter.java:104) [hawtio-system-2.14.0.jar:2.14.0]
at io.hawt.web.auth.AuthenticationFilter.doFilter(AuthenticationFilter.java:72) [hawtio-system-2.14.0.jar:2.14.0]
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
at io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43) [hawtio-system-2.14.0.jar:2.14.0]
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
at io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43) [hawtio-system-2.14.0.jar:2.14.0]
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
at io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43) [hawtio-system-2.14.0.jar:2.14.0]
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
at io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43) [hawtio-system-2.14.0.jar:2.14.0]
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
at io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43) [hawtio-system-2.14.0.jar:2.14.0]
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
at io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43) [hawtio-system-2.14.0.jar:2.14.0]
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
at io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43) [hawtio-system-2.14.0.jar:2.14.0]
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
at io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43) [hawtio-system-2.14.0.jar:2.14.0]
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
at io.hawt.web.auth.SessionExpiryFilter.process(SessionExpiryFilter.java:166) [hawtio-system-2.14.0.jar:2.14.0]
at io.hawt.web.auth.SessionExpiryFilter.doFilter(SessionExpiryFilter.java:60) [hawtio-system-2.14.0.jar:2.14.0]
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:201)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
at org.apache.activemq.artemis.component.JolokiaFilter.doFilter(JolokiaFilter.java:50) [artemis-web-2.20.0.jar:2.20.0]
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1434)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1349)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:59)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.Server.handle(Server.java:516)
at org.eclipse.jetty.server.HttpChannel.lambda$handle(HttpChannel.java:400)
at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:645)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:392)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
at org.eclipse.jetty.io.ChannelEndPoint.run(ChannelEndPoint.java:104)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
at java.base/java.lang.Thread.run(Thread.java:833) [java.base:]
推送消息的代码是-
import time
import sys
import stomp
hosts = [('localhost', 61613)]
class Listener(stomp.ConnectionListener):
def on_error(self, frame):
print('received an error "%s"' % frame.body)
def on_message(self, frame):
print('received an message "%s"' % frame.body)
conn = stomp.Connection(host_and_ports=hosts)
conn.set_listener('', Listener())
conn.connect('aau01', 'aau01', wait=True)
conn.send(destination='ACS01', body='<hello>Red</hello>')
conn.send(destination='ACS01', body='<hello>Blue</hello>')
time.sleep(5)
conn.disconnect()
此外,控制台指示消息仍在队列中(图像的底部窗格 - 1-2,共 2),但不在浏览中显示消息 window -
还需要考虑的另一件事是,当我浏览使用控制台推送的消息时,消息在浏览队列中可见 window。 感谢您的帮助!
存在一个错误,当队列中的其中一封邮件包含 null
属性 值时,该错误会阻止浏览邮件。在这种情况下,代理本身错误地设置了 null
属性 值。一旦可用,您需要升级到 ActiveMQ Artemis 2.21.0,因为它将包含 ARTEMIS-3677 and ARTEMIS-3696. It just passed the release vote 的修复程序,因此它应该在接下来的几天内可以在网站上下载。需要明确的是,这里唯一的问题是浏览消息。您应该可以毫无问题地使用消息。
当您通过 Web 控制台将消息推送到队列时,使用的是核心协议(即不是 STOMP),这就是您可以成功浏览的原因。