Using SDK perf with a user containing the @ character in its name

Let say I want to connect to my broker with a specific user:

john@system

I am wondering how to escape the @ character as the -cu option is taking the first @ as vpn separator.

If I launch my command with:

./sdkperf_java.sh -cip=tcps://my-server.my.domain.net:55552 -cu=john@system@my-vpn -cp=The$amplePa$$ -stl="mytopic/order/retry" -md -q

it makes an error:

Run Info: CPU usage currently disabled.
Client naming used:
		logging ID   = perf_client000001
		username     = john
		vpn          = system
		client names = sdk generated.

> VM Name: OpenJDK 64-Bit Server VM
Run Info: Using Java Nanosecond Timer for Timing
> Timing Package Clock Speed (Hz): 1000000000
> Getting ready to init clients
E: Initialization error: client creation failed.
com.solacesystems.pubsub.sdkperf.core.PubSubException: Error while connecting.
		at com.solacesystems.pubsub.sdkperf.core.AbstractClientCollection.connect(AbstractClientCollection.java:450)
		at com.solacesystems.pubsub.sdkperf.SDKPerf_java.run(SDKPerf_java.java:183)
		at com.solacesystems.pubsub.sdkperf.SDKPerf_java.main(SDKPerf_java.java:117)
Caused by: ((Client name: MYHOST/10274/00190001/I1QsJVNjaj   Local addr: 192.168.73.254 Local port: 57631   Remote addr: my-server.my.domain.net  Remote port: 55552) - )  com.solacesystems.jcsmp.JCSMPErrorResponseException: 403: Message VPN Not Allowed [Subcode:3]
		at com.solacesystems.jcsmp.protocol.impl.TcpChannel.executePostOnce(TcpChannel.java:232)
		at com.solacesystems.jcsmp.protocol.impl.ChannelOpStrategyClient.performOpen(ChannelOpStrategyClient.java:97)

Is there a way to escape this first ‘@’ to prevent being interpreted as the VPN?

Hi there, I’m Solly AI, I generate responses to your questions using the power of the Solace Agent Mesh:

Please remember that AI technology can make mistakes so ensure that you read our Disclaimer.

AI Generated responses are a work in progress, your help in evaluating my response would be awesome! If my response makes sense, please mark it as a solution or give a :+1:. If my response doesn’t make sense for your topic, please react to it with a :shaking_face:.

Looking through the documentation, I don’t find any explicit information about escaping the @ character in usernames when using SDKPerf. The documentation shows examples of using usernames with @ for specifying the Message VPN like:

-cu=username@vpn

But does not specifically address escaping special characters.

Since this information is not explicitly documented, I recommend:

  1. Checking the SDKPerf help by running:
sdkperf -hm
  1. Reviewing the following documentation sources for more details:

If you need to use special characters in usernames, you may want to test different escaping methods or consider using a username without special characters if possible.

Unfortunately no there is no way to escape the ‘@’ character from the sdkperf -cu option. However from the help text in shown in -hm you find:

-epl list       Comma sep list of extra Props passed blindly to the API

These properties are applied last and can override the “jcsmp.username“ property without sdkperf parsing for the “@”.

So your command should be:

./sdkperf_java.sh -cip=tcps://my-server.my.domain.net:55552 -cu=default@my-vpn -cp=The$amplePa$$ -stl="mytopic/order/retry" -md -q -epl=jcsmp.username,john@system