Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing anonymous queues leads to exceptions #266

Open
GreenRover opened this issue Feb 14, 2024 · 0 comments
Open

Testing anonymous queues leads to exceptions #266

GreenRover opened this issue Feb 14, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@GreenRover
Copy link
Contributor

GreenRover commented Feb 14, 2024

When consuming form a queue without queue_group. an exception might be thrown.

Log of application:

2024-02-13T14:12:20.082+01:00  INFO 1 --- [           main] c.s.s.c.s.b.p.SolaceQueueProvisioner     : Connected test consumer flow to queue scst/an/416c77de-6b48-46df-8652-2dd36325e91a/plain/internal/a/very/big/secret/update, closing it
2024-02-13T14:12:20.060+01:00  INFO 1 --- [           main] c.s.s.c.s.b.p.SolaceQueueProvisioner     : Testing consumer flow connection to queue scst/an/416c77de-6b48-46df-8652-2dd36325e91a/plain/internal/a/very/big/secret/update (will not start it)
2024-02-13T14:12:20.060+01:00  INFO 1 --- [           main] c.s.s.c.s.b.p.SolaceQueueProvisioner     : Creating anonymous (temporary) queue scst/an/416c77de-6b48-46df-8652-2dd36325e91a/plain/internal/a/very/big/secret/update
Caused by: com.solacesystems.jcsmp.JCSMPErrorResponseException: 503: Max clients exceeded for queue
	at com.solacesystems.jcsmp.impl.flow.BindRequestTask.execute(BindRequestTask.java:214) ~[sol-jcsmp-10.20.0.jar!/:na]
	at com.solacesystems.jcsmp.impl.flow.SubFlowManagerImpl.handleAssuredCtrlMessage(SubFlowManagerImpl.java:578) ~[sol-jcsmp-10.20.0.jar!/:na]
	at com.solacesystems.jcsmp.protocol.impl.TcpClientChannel.handleAssuredCtrlMsg(TcpClientChannel.java:1789) ~[sol-jcsmp-10.20.0.jar!/:na]
	at com.solacesystems.jcsmp.protocol.impl.TcpClientChannel.handleMessage(TcpClientChannel.java:1754) ~[sol-jcsmp-10.20.0.jar!/:na]
	at com.solacesystems.jcsmp.protocol.nio.impl.SubscriberMessageReader.processRead(SubscriberMessageReader.java:98) ~[sol-jcsmp-10.20.0.jar!/:na]
	at com.solacesystems.jcsmp.protocol.nio.impl.SubscriberMessageReader.read(SubscriberMessageReader.java:140) ~[sol-jcsmp-10.20.0.jar!/:na]
	at com.solacesystems.jcsmp.protocol.smf.SimpleSmfClient.read(SimpleSmfClient.java:1206) ~[sol-jcsmp-10.20.0.jar!/:na]
	at com.solacesystems.jcsmp.protocol.nio.impl.SyncEventDispatcherReactor.processReactorChannels(SyncEventDispatcherReactor.java:206) ~[sol-jcsmp-10.20.0.jar!/:na]
	at com.solacesystems.jcsmp.protocol.nio.impl.SyncEventDispatcherReactor.eventLoop(SyncEventDispatcherReactor.java:157) ~[sol-jcsmp-10.20.0.jar!/:na]
	at com.solacesystems.jcsmp.protocol.nio.impl.SyncEventDispatcherReactor$SEDReactorThread.run(SyncEventDispatcherReactor.java:338) ~[sol-jcsmp-10.20.0.jar!/:na]
	at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]
Caused by: org.springframework.messaging.MessagingException: Failed to get message consumer for inbound adapter 02d70c63-e84e-4585-87f4-0a5a74d07764
	at com.solace.spring.cloud.stream.binder.inbound.JCSMPInboundChannelAdapter.doStart(JCSMPInboundChannelAdapter.java:142) ~[spring-cloud-stream-binder-solace-core-4.0.0.jar!/:na]
	at org.springframework.integration.endpoint.AbstractEndpoint.start(AbstractEndpoint.java:155) ~[spring-integration-core-6.0.6.jar!/:6.0.6]
	at org.springframework.cloud.stream.binder.AbstractMessageChannelBinder.doBindConsumer(AbstractMessageChannelBinder.java:518) ~[spring-cloud-stream-4.0.2.jar!/:4.0.2]
	... 31 common frames omitted
org.springframework.cloud.stream.binder.BinderException: Exception thrown while starting consumer: 
	at org.springframework.cloud.stream.binder.AbstractMessageChannelBinder.doBindConsumer(AbstractMessageChannelBinder.java:576) ~[spring-cloud-stream-4.0.2.jar!/:4.0.2]
	at org.springframework.cloud.stream.binder.AbstractMessageChannelBinder.doBindConsumer(AbstractMessageChannelBinder.java:102) ~[spring-cloud-stream-4.0.2.jar!/:4.0.2]
	at org.springframework.cloud.stream.binder.AbstractBinder.bindConsumer(AbstractBinder.java:144) ~[spring-cloud-stream-4.0.2.jar!/:4.0.2]
	at org.springframework.cloud.stream.binding.BindingService.doBindConsumer(BindingService.java:186) ~[spring-cloud-stream-4.0.2.jar!/:4.0.2]
	at org.springframework.cloud.stream.binding.BindingService.bindConsumer(BindingService.java:139) ~[spring-cloud-stream-4.0.2.jar!/:4.0.2]
	at org.springframework.cloud.stream.binding.AbstractBindableProxyFactory.createAndBindInputs(AbstractBindableProxyFactory.java:98) ~[spring-cloud-stream-4.0.2.jar!/:4.0.2]
	at org.springframework.cloud.stream.binding.InputBindingLifecycle.doStartWithBindable(InputBindingLifecycle.java:58) ~[spring-cloud-stream-4.0.2.jar!/:4.0.2]
	at java.base/java.util.LinkedHashMap$LinkedValues.forEach(LinkedHashMap.java:647) ~[na:na]
	at org.springframework.cloud.stream.binding.AbstractBindingLifecycle.start(AbstractBindingLifecycle.java:57) ~[spring-cloud-stream-4.0.2.jar!/:4.0.2]
	at org.springframework.cloud.stream.binding.InputBindingLifecycle.start(InputBindingLifecycle.java:34) ~[spring-cloud-stream-4.0.2.jar!/:4.0.2]
	at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:179) ~[spring-context-6.0.11.jar!/:6.0.11]
	at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:357) ~[spring-context-6.0.11.jar!/:6.0.11]
	at java.base/java.lang.Iterable.forEach(Iterable.java:75) ~[na:na]
	at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:156) ~[spring-context-6.0.11.jar!/:6.0.11]
	at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:124) ~[spring-context-6.0.11.jar!/:6.0.11]
	at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:958) ~[spring-context-6.0.11.jar!/:6.0.11]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:611) ~[spring-context-6.0.11.jar!/:6.0.11]
	at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.refresh(ReactiveWebServerApplicationContext.java:66) ~[spring-boot-3.0.9.jar!/:3.0.9]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:732) ~[spring-boot-3.0.9.jar!/:3.0.9]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:434) ~[spring-boot-3.0.9.jar!/:3.0.9]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:310) ~[spring-boot-3.0.9.jar!/:3.0.9]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1304) ~[spring-boot-3.0.9.jar!/:3.0.9]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1293) ~[spring-boot-3.0.9.jar!/:3.0.9]
	at xx.yy.zz.NedToBeObfuscated.main(PssGatewayApplication.java:23) ~[classes!/:5.4.0]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
	at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
	at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) ~[app.jar:5.4.0]
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:95) ~[app.jar:5.4.0]
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) ~[app.jar:5.4.0]
	at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:65) ~[app.jar:5.4.0]
2024-02-13T14:12:19.957+01:00 ERROR 1 --- [           main] o.s.cloud.stream.binding.BindingService  : Failed to create consumer binding; retrying in 30 seconds
2024-02-13T14:12:19.954+01:00  INFO 1 --- [2_ReactorThread] c.s.jcsmp.impl.flow.BindRequestTask      : Client-2: Got BIND ('#P2P/QTMP/v:perrkdc73ukprimary/scst/an/983d02bf-f67a-4078-af3b-83755e2f3879/plain/internal/a/very/big/secret/subscription') Error Response (503) - Max clients exceeded for queue
2024-02-13T14:12:19.937+01:00  INFO 1 --- [           main] c.s.s.c.s.b.util.FlowReceiverContainer   : Flow receiver container daa95d76-9ff5-4c11-aac2-d03e1368218c started in state 'Running'

Log of broker

2024-02-13T13:12:20+00:00 kilo-production-v814g6qq5ws-solace-primary-0 tagNOTI: VPN: VPN_AD_QENDPT_CREATE: TotalyObfuscated - Message VPN (1) Queue #P2P/QTMP/v:perrkdc73ukprimary/scst/an/416c77de-6b48-46df-8652-2dd36325e91a/plain/internal/a/very/big/secret/update created
2024-02-13T13:12:20+00:00 kilo-production-v814g6qq5ws-solace-primary-0 tagNOTI: CLIENT: CLIENT_CLIENT_BIND_SUCCESS: ThisShouldNoOneNerverKnow-dcfd6f56c-mb4kf/1/00140002/lX2Q9H-ZeS Client (182) rti-xxx-gateway-dcfd6f56c-mb4kf/1/00140002/lX2Q9H-ZeS username a/very/big/secret Bind to Non-Durable Queue #P2P/QTMP/v:perrkdc73ukprimary/scst/an/416c77de-6b48-46df-8652-2dd36325e91a/plain/internal/a/very/big/secret/update Topic(), Selector(), AccessType(Exclusive), Quota(2000MB), MaxMessageSize(10000000B), AllOthersPermission(Read|Consume), RespectTTL(Yes), RejectMsgToSenderOnDiscard(No), ReplayFrom(N/A), GrantedPermission(Read|Consume|Modify-Topic|Delete), FlowType(Consumer), FlowId(711), ForwardingMode(StoreAndForward), MaxRedelivery(3), TransactedSessionId(-1) completed
2024-02-13T13:12:20+00:00 kilo-production-v814g6qq5ws-solace-primary-0 tagNOTI: VPN: VPN_AD_QENDPT_DELETE: TotalyObfuscated - Message VPN (1) Queue #P2P/QTMP/v:perrkdc73ukprimary/scst/an/416c77de-6b48-46df-8652-2dd36325e91a/plain/internal/a/very/big/secret/pdate deleted, final statistics - spool(0, 0, 0, 0, 0, 0, 0, 0) bind(1, 1, 0, 0, 0)
2024-02-13T13:12:20+00:00 kilo-production-v814g6qq5ws-solace-primary-0 tagNOTI: VPN: VPN_AD_QENDPT_CREATE: TotalyObfuscated - Message VPN (1) Queue #P2P/QTMP/v:perrkdc73ukprimary/scst/an/416c77de-6b48-46df-8652-2dd36325e91a/plain/internal/a/very/big/secret/update created
2024-02-13T13:12:20+00:00 kilo-production-v814g6qq5ws-solace-primary-0 tagNOTI: CLIENT: CLIENT_CLIENT_BIND_SUCCESS: TotalyObfuscated rti-pss-gateway-dcfd6f56c-mb4kf/1/00140002/lX2Q9H-ZeS Client (182) rti-pss-gateway-dcfd6f56c-mb4kf/1/00140002/lX2Q9H-ZeS username a/very/big/secret Bind to Non-Durable Queue #P2P/QTMP/v:perrkdc73ukprimary/scst/an/416c77de-6b48-46df-8652-2dd36325e91a/plain/internal/a/very/big/secret/update Topic(), Selector(), AccessType(Exclusive), Quota(2000MB), MaxMessageSize(10000000B), AllOthersPermission(Read|Consume), RespectTTL(Yes), RejectMsgToSenderOnDiscard(No), ReplayFrom(N/A), GrantedPermission(Read|Consume|Modify-Topic|Delete), FlowType(Consumer), FlowId(712), ForwardingMode(StoreAndForward), MaxRedelivery(3), TransactedSessionId(-1) completed
root@ip-10-241-165-196:/var/log/solace/kilo-production-v814g6qq5ws-solace-primary-0#

Solution: Don "test" anonymous queues. This may lead to an race condition on broker with the results of an "Max clients exceeded for queue" exceptrion.

@Nephery Nephery added the bug Something isn't working label Feb 14, 2024
helios57 added a commit to SchweizerischeBundesbahnen/spring-cloud-stream-binder that referenced this issue Apr 23, 2024
helios57 added a commit to SchweizerischeBundesbahnen/spring-cloud-stream-binder that referenced this issue Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants