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

Make sure samples are working in dev mode, with added tests #36

Closed
ozangunalp opened this issue Jan 26, 2024 · 2 comments · Fixed by #40
Closed

Make sure samples are working in dev mode, with added tests #36

ozangunalp opened this issue Jan 26, 2024 · 2 comments · Fixed by #40
Assignees

Comments

@ozangunalp
Copy link
Collaborator

If I am not mistaken the hello-connector-solace example project is not working OOTB with a quarkus dev command.

We need to make sure that it contains correct, working examples for incoming and outgoing channels.

A general cleanup would also be welcomed. For example, ack and nack callbacks added here are not necessary and can be omitted:

Message<?> outboundMessage = Message.of(p.getPayload(), Metadata.of(outboundMetadata), () -> {
CompletableFuture completableFuture = new CompletableFuture();
p.ack();
completableFuture.complete(null);
return completableFuture;
}, (throwable) -> {
CompletableFuture completableFuture = new CompletableFuture();
p.nack(throwable, p.getMetadata());
completableFuture.complete(null);
return completableFuture;
});

@SravanThotakura05
Copy link
Collaborator

Hi @ozangunalp. Can you post the exact exception you are facing. I have left the application.properties with empty values. We need to configure it before running. Are you facing the issue after configuring the right values in application.properties

@ozangunalp
Copy link
Collaborator Author

I'd expect that the sample would work with the Solace dev service provided by the extension, without configuring values in application.propertiesfile.
Even when I remove the empty values I've got an Unknown queue exception :

Caused by: com.solace.messaging.PubSubPlusClientException$MissingResourceException: 503: Unknown Queue
        at com.solace.messaging.receiver.PersistentMessageReceiverImpl.createSolaceConsumer(PersistentMessageReceiverImpl.java:1387)
        at com.solace.messaging.receiver.PersistentMessageReceiverImpl.onStart(PersistentMessageReceiverImpl.java:1193)
        at com.solace.messaging.receiver.PersistentMessageReceiverImpl.startAsync(PersistentMessageReceiverImpl.java:442)
        at com.solace.messaging.receiver.PersistentMessageReceiverImpl.start(PersistentMessageReceiverImpl.java:249)
        at com.solace.quarkus.messaging.incoming.SolaceIncomingChannel.<init>(SolaceIncomingChannel.java:129)
        at com.solace.quarkus.messaging.SolaceConnector.getPublisher(SolaceConnector.java:93)
        at com.solace.quarkus.messaging.SolaceConnector_Subclass.getPublisher$$superforward(Unknown Source)
        at com.solace.quarkus.messaging.SolaceConnector_Subclass$$function$$16.apply(Unknown Source)
        at io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:73)
        at io.quarkus.arc.impl.AroundInvokeInvocationContext$NextAroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:97)
        at io.quarkus.smallrye.reactivemessaging.runtime.devmode.DevModeSupportConnectorFactoryInterceptor.intercept(DevModeSupportConnectorFactoryInterceptor.java:53)
        at io.quarkus.smallrye.reactivemessaging.runtime.devmode.DevModeSupportConnectorFactoryInterceptor_Bean.intercept(Unknown Source)
        at io.quarkus.arc.impl.InterceptorInvocation.invoke(InterceptorInvocation.java:42)
        at io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:70)
        at io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:62)
        at io.quarkus.smallrye.reactivemessaging.runtime.DuplicatedContextConnectorFactoryInterceptor.intercept(DuplicatedContextConnectorFactoryInterceptor.java:32)
        at io.quarkus.smallrye.reactivemessaging.runtime.DuplicatedContextConnectorFactoryInterceptor_Bean.intercept(Unknown Source)
        at io.quarkus.arc.impl.InterceptorInvocation.invoke(InterceptorInvocation.java:42)
        at io.quarkus.arc.impl.AroundInvokeInvocationContext.perform(AroundInvokeInvocationContext.java:30)
        at io.quarkus.arc.impl.InvocationContexts.performAroundInvoke(InvocationContexts.java:27)
        at com.solace.quarkus.messaging.SolaceConnector_Subclass.getPublisher(Unknown Source)
        at com.solace.quarkus.messaging.SolaceConnector_ClientProxy.getPublisher(Unknown Source)
        at io.smallrye.reactive.messaging.providers.impl.ConfiguredChannelFactory.createPublisher(ConfiguredChannelFactory.java:172)
        at io.smallrye.reactive.messaging.providers.impl.ConfiguredChannelFactory.register(ConfiguredChannelFactory.java:134)
        at io.smallrye.reactive.messaging.providers.impl.ConfiguredChannelFactory.initialize(ConfiguredChannelFactory.java:106)
        at io.smallrye.reactive.messaging.providers.impl.ConfiguredChannelFactory_ClientProxy.initialize(Unknown Source)
        at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
        at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1845)
        at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762)
        at io.smallrye.reactive.messaging.providers.extension.MediatorManager.start(MediatorManager.java:212)
        at io.smallrye.reactive.messaging.providers.extension.MediatorManager_ClientProxy.start(Unknown Source)
        at io.quarkus.smallrye.reactivemessaging.runtime.SmallRyeReactiveMessagingLifecycle.onApplicationStart(SmallRyeReactiveMessagingLifecycle.java:52)
        ... 21 more
Caused by: ((Client name: ogunalp-mac/9453/00af0003/gaB6IVhCzE   Local addr: 127.0.0.1 Local port: 49298   Remote addr: localhost  Remote port: 49255) - )  com.solacesystems.jcsmp.JCSMPErrorResponseException: 503: Unknown Queue [Subcode:20]
        at com.solacesystems.jcsmp.impl.flow.BindRequestTask.execute(BindRequestTask.java:213)
        at com.solacesystems.jcsmp.impl.flow.SubFlowManagerImpl.handleAssuredCtrlMessage(SubFlowManagerImpl.java:578)
        at com.solacesystems.jcsmp.protocol.impl.TcpClientChannel.handleAssuredCtrlMsg(TcpClientChannel.java:1840)
        at com.solacesystems.jcsmp.protocol.impl.TcpClientChannel.handleMessage(TcpClientChannel.java:1805)
        at com.solacesystems.jcsmp.protocol.nio.impl.SubscriberMessageReader.processRead(SubscriberMessageReader.java:98)
        at com.solacesystems.jcsmp.protocol.nio.impl.SubscriberMessageReader.read(SubscriberMessageReader.java:140)
        at com.solacesystems.jcsmp.protocol.smf.SimpleSmfClient.read(SimpleSmfClient.java:1206)
        at com.solacesystems.jcsmp.protocol.nio.impl.SyncEventDispatcherReactor.processReactorChannels(SyncEventDispatcherReactor.java:206)
        at com.solacesystems.jcsmp.protocol.nio.impl.SyncEventDispatcherReactor.eventLoop(SyncEventDispatcherReactor.java:157)
        at com.solacesystems.jcsmp.protocol.nio.impl.SyncEventDispatcherReactor$SEDReactorThread.run(SyncEventDispatcherReactor.java:338)
        ... 1 more

Maybe we can configure something on Solace broker to auto-create queues ?

SravanThotakura05 added a commit that referenced this issue Jan 29, 2024
@SravanThotakura05 SravanThotakura05 self-assigned this Jan 29, 2024
@SravanThotakura05 SravanThotakura05 linked a pull request Jan 29, 2024 that will close this issue
ozangunalp added a commit that referenced this issue Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants