-
How to set max-delivered-unacked-msgs-per-flow via JCSMP API
I see that .Net API has methods to set WindowSize and MaxUnackedMessages () But I do not see any such documentation for JCSMP API, can you please let me know how to set those? Regards, Karthik
-
Should the FlowReceiver be closed before recreating a new FlowReceiver?
I am following along with this solace tutorial. I am now testing and handling this portion of the tutorial where I handle REPLAY_START_TIME_NOT_AVAILABLE: . I have added a System.out.println(consumer.isClosed()); before I recreate a new FlowReceiver to replay from the beginning. This is printing out false.…
-
PERFORMANCE! Why you should use Message.reset() in Solace APIs..!
Hi Developers! Want to go fast? Faster, anyway? Read on... I'm just putting the finishing touches on a new bunch of Solace Java (JCSMP) samples, and have been doing a bit of performance testing with them. They are still meant to be fairly simple and straightforward, and don't try to maximize absolute throughput…
-
How to get a specific message body from a queue using a unique ID
I want to know the best way to get the message Body of a specific message instance in a queue. The method I use is the following: My software is calling the SEMP API to get a list of messages metadata like this: {{solace-admin-url}}/SEMP/v2/monitor/msgVpns/my-vpn-name/queues/myqueuename/msgs and the json response looks…
-
Reprocessing Messages
I have a scenario similar to the one mentioned in this post How can I get it to work in JCSMP with spring boot?
-
How can I replay from a specific message ID?
My main purpose is to be able to replay from a specific message. I want to be able to keep track of which was the last message that was successfully processed, so that I wont have to replay from the start or replay the whole day's worth of message. I think that in order to do this, I would need to be able to find out how…
-
Not able to update JWT using updateProperties()
Hi Solace Community, I am using the Java Api version 1.1 Currently I am experiencing a problem that I am unable to resolve where calling the "updateProperty()" function for the messaging service isn't logging, returning feedback or actually changing the JWT token that I am sending. The JWT I am generating is successfully…
-
JCSMP Ack mode
Hello. I'm creating a Jcsmp session based on this tutorial: solace-samples-java-jcsmp/QueueConsumer.java at master · SolaceSamples/solace-samples-java-jcsmp · GitHub. even if I'm setting the flow_prop.setAckMode(JCSMPProperties.SUPPORTED_MESSAGE_ACK_CLIENT); and passing the flow_prop to the session as in the tutorial. the…
-
Samples for JCSMP use deprecated classes
I just faced today when looking at JCSMP samples for publishing e.g. to topic that samples here: https://tutorials.solace.dev/jcsmp/publish-subscribe/ + https://github.com/SolaceSamples/solace-samples-java-jcsmp/blob/master/src/main/java/com/solace/samples/jcsmp/features/TopicPublisher.java to not get adapted to a latest…
-
Two or more consumers for different topics
Here in this question, I managed to solve the queue issue: Two or more consumers for different queues Now, the following question remains: In the same application, I need to process non-persistent messages, which are sent to different topics and have different formats: 1) update-certificate; 2) update-credentials; In this…
-
How to connect XASession of Solace JCSMP API with Weblogic Database XAConnection?
Hi team, I am looking for a way to connect solace XASession with database XA connection (my datasource is on weblogic server) so that if the query execution fails, solace transaction should rollback when db transaction.rollback is called; and same with commit statement. Or vice-versa - if solace transaction is rolled back,…
-
Solace SpringCloudStream PubSub model using durable topic endpoint
We have a requirement to stop listening to queue when any error occurred while processing. We are on Kubernates and we have many instances of an application which listening to the same queue, so if i try to stop listening to queue using the service name it stops only one instance others still listening to the queue. As in…
-
My Question is regarding Replay in Solace
Hi , I have following questions on Replay Want to know more about the replay Queues that gets created once we enable the replay on our VPN. One of the queues has name like Replay Log which stores all the persistant messages getting send to the VPN , what about the other queue having name like REPLAY_TOPICS what exactly is…
-
JCSMP get numbers of messages in QUEUE
Hi, is it possible to get actual number of messages in a queue with JCSMP API ? I want to monitor that number each 5 sec.
-
JCSMP Blocking Publisher Example: Timeout configurable
Hi Community, I have a question on the JCSMP BlockingSynchronousSendGuaranteed.java sample: What happens, if the broker doesn't respond with either an ACK or a NACK? Is this even possible or under which conditions could that occur? (I read something about disk full could be one potential situation.) Is there a timeout for…
-
Disable message redelivery in Solace container
Hello, Some integration tests fail randomly because the message is redelivered multiple times and we couldn't find why. We can see in Solace UI that the queue only received 10 messages but we can see that the message was redelivered 20 times even though we are acknowledging the message in the consumer. Is there a way to…
-
Integrating the Solace Kafka Sink Connector with Confluent Schema Registry
Avro is a common message format used for Kafka records. Large Kafka implementations leveraging Avro often use the Confluent Schema Registry to ensure uniform record schemas across publishers and subscribers. When using the Solace PubSub+ Kafka Connectors to publish Kafka records as Solace PubSub+ events, it may be…
-
Topic dispatching with guaranteed delivery using JCSMP
Hi there, The article here explains how one can have custom callback to handle guaranteed messages received with matching topics thru flows bound to queues using Java RTO. Is there something similar for the JCSMP API, or another way that we can achieve something like that? On a related note, there's normally only be one…
-
Clarify Default Values for properties on setters in Solace API Libraries
Solace comes along with many settings and when using libraries the settings an be changed via setters. Let's take an example: DMQEligible In JCSMP: (good as mentioning default) https://docs.solace.com/API-Developer-Online-Ref-Documentation/java/index.html on Message Class it states clearly what is the default. "Set the…
-
What s best way from java to delete a single Message in Queue
I use JSCMP queue. browser to loom up message inside a queue. Now i want to delete. some of this msssages and look for best way to do so. Is there a way via JSCMP? via SEMP i found that: https://docs.solace.com/API-Developer-Online-Ref-Documentation/swagger-ui/action/index.html#/queue I was surprised a PUT was used for…
-
What is the best way to get the actual queue message count ?
I am using currently Jcsmp and sure i can use queue browser to fetch all data and check collection size but there should be an easier way to check queue size without fetching all data. So i find this one: https://solace.community/discussion/398/how-to-check-the-size-of-a-message-queue But when i run towards my docker image…
-
Spring Cloud Stream - Solace JMS Client Passwords configuration
Hi All, Let me share steps we use for us, 1. We have autoconfiguration for queues and topics, (using solace binders(Sink, Source, StreamBinders)) 2. We have solace auto configurations 3. Solace clients( random generated clients) connects to queues 4. I have to decrypt the password and inject the same password in runtime by…
-
How to keep message listener up and running to asynchronously keep receiving messages
Hi, I am using JCSMP API. For listening to messages. I am using asynchronous receiving by implementing XMLMessageListener. Once I started FlowReceiver, it starts listening to messages, my program terminates after some time. I want my listener to be up and running until I terminate my program. Is it possible keep the…
-
Do I need to close my JCSMP consumer/session on application shutdown?
I generally like to close resources gracefully when shutting down an application, and ran into a scenario where my queue consumer still had an outstanding message that it tried to ack() after the consumer had been closed, so I got the message "Attempted an operation on a closed message consumer." If upon shutdown I instead…
-
FlowHandle received incoming message (flow stopped or duplicate received)
Hi All, When I try to configure Solace for multiple VPN connections, I am getting below exception while publishing message to ConsumerFlow. Please help. "FlowHandle received incoming message (flow stopped or duplicate received), ignoring. Could not reply for correlationId: 3926add4-4aab-4472-b7ab-4d460e0ecf30","exception"
-
Logstash input and output plugins for Solace
Hi everyone! Just a quick note to say that I've started writing some dedicated/native plugins for Logstash using JCSMP, both an input plugin (reads messages off Solace and injects into Logstash), and output plugin (takes Logstash events and publishes as Solace messages). Logstash has been around forever, and integrates…
-
Integration testing without a broker
Hi, I am using solace java jcsmp and want to do some integration tests across gradle modules. The main issue is that we can't use a solace broker in this particular case, so using a local container with the broker isn't an option. Is there an alternative such as mocking the broker somehow?
-
Getting getSplitBacklogBytes() unable to read bytes error after draining Streaming Dataflow job
I am trying to read messages from solace queues through solace io connector and then writing them to GCS bucket , i was able to read and write messages to GCS as it was streaming job i need to drain it so when i drain the Streaming dataflow job getting below error error: getSplitBacklogBytes() unable to read bytes from:…
-
Order of messages in different topics and fairness
Hi, I have a question about order of messages in different topics: 1) Suppose a service publishes messages A, B into topic T1 and then messages C, D into topic T2. If a different service subscribes (via JCSMP API) to both topics T1 and T2 will it receive messages A, B before C, D? 2) Is there a different answer to 1) if a…
-
How to publish and consume an attachment(.txt) file along with each message in queue?
Is there a way to publish a message and an attachment(.txt) file to a queue? Can this message and the attached file be consumed using java interface?