I need to get 10 different durable subscribers added to a message broker by reading the durable subscription IDs to be set from a csv file which contains integer values from 1 - 10. However, JMeter was failing to read the value instead it tried to set the subscritpition ID as ${id}. Below is the configuration that I have done in JMeter.
Please note that when I tried the same by a user defined variable it will then get the value of the variable and create the durable subscription successfully.
JMeter log below.
2016/08/29 17:56:39 INFO - jmeter.engine.StandardJMeterEngine: Running the test!
2016/08/29 17:56:39 INFO - jmeter.samplers.SampleEvent: List of sample_variables: []
2016/08/29 17:56:39 INFO - jmeter.gui.util.JMeterMenuBar: setRunning(true,*local*)
2016/08/29 17:56:39 INFO - jmeter.engine.StandardJMeterEngine: Starting ThreadGroup: 1 : DueTopic1 - Node 1- Sub 1
2016/08/29 17:56:39 INFO - jmeter.engine.StandardJMeterEngine: Starting 1 threads for group DueTopic1 - Node 1- Sub 1.
2016/08/29 17:56:39 INFO - jmeter.engine.StandardJMeterEngine: Thread will continue on error
2016/08/29 17:56:39 INFO - jmeter.threads.ThreadGroup: Starting thread group number 1 threads 1 ramp-up 1 perThread 1000.0 delayedStart=false
2016/08/29 17:56:39 INFO - jmeter.threads.ThreadGroup: Started thread group number 1
2016/08/29 17:56:39 INFO - jmeter.engine.StandardJMeterEngine: All thread groups have been started
2016/08/29 17:56:39 INFO - jmeter.threads.JMeterThread: Thread started: DueTopic1 - Node 1- Sub 1 1-1
2016/08/29 17:56:39 ERROR - jmeter.protocol.jms.client.ReceiveSubscriber: Error during close: javax.jms.JMSException: Error closing connection: org.wso2.andes.AMQConnectionClosedException: Error: Subscription ID: carbon:${id} cannot contain any of following symbols ~!@#;%^*()+={}|<>"', and space. " / " can only use as the tenant separator
[error code 541: internal error]
at org.wso2.andes.client.AMQConnection.doClose(AMQConnection.java:971)
at org.wso2.andes.client.AMQConnection.close(AMQConnection.java:897)
at org.wso2.andes.client.AMQConnection.close(AMQConnection.java:888)
at org.wso2.andes.client.AMQConnection.close(AMQConnection.java:883)
at org.apache.jmeter.protocol.jms.Utils.close(Utils.java:78)
at org.apache.jmeter.protocol.jms.client.ReceiveSubscriber.close(ReceiveSubscriber.java:359)
at org.apache.jmeter.protocol.jms.client.ReceiveSubscriber.<init>(ReceiveSubscriber.java:255)
at org.apache.jmeter.protocol.jms.client.ReceiveSubscriber.<init>(ReceiveSubscriber.java:115)
at org.apache.jmeter.protocol.jms.sampler.SubscriberSampler.initReceiveClient(SubscriberSampler.java:126)
at org.apache.jmeter.protocol.jms.sampler.SubscriberSampler.threadStarted(SubscriberSampler.java:298)
at org.apache.jmeter.threads.JMeterThread$ThreadListenerTraverser.addNode(JMeterThread.java:647)
at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:996)
at org.apache.jorphan.collections.HashTree.traverse(HashTree.java:978)
at org.apache.jmeter.threads.JMeterThread.threadStarted(JMeterThread.java:616)
at org.apache.jmeter.threads.JMeterThread.initRun(JMeterThread.java:604)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:237)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.wso2.andes.AMQConnectionClosedException: Error: Subscription ID: carbon:${id} cannot contain any of following symbols ~!@#;%^*()+={}|<>"', and space. " / " can only use as the tenant separator
[error code 541: internal error]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.wso2.andes.AMQException.cloneForCurrentThread(AMQException.java:110)
at org.wso2.andes.client.protocol.AMQProtocolHandler.writeCommandFrameAndWaitForReply(AMQProtocolHandler.java:640)
at org.wso2.andes.client.protocol.AMQProtocolHandler.syncWrite(AMQProtocolHandler.java:676)
at org.wso2.andes.client.protocol.AMQProtocolHandler.closeConnection(AMQProtocolHandler.java:707)
at org.wso2.andes.client.AMQConnectionDelegate_8_0.closeConnection(AMQConnectionDelegate_8_0.java:61)
at org.wso2.andes.client.AMQConnection.doClose(AMQConnection.java:955)
... 16 more
Caused by: org.wso2.andes.AMQConnectionClosedException: Error: Subscription ID: carbon:${id} cannot contain any of following symbols ~!@#;%^*()+={}|<>"', and space. " / " can only use as the tenant separator
[error code 541: internal error]
at org.wso2.andes.client.handler.ConnectionCloseMethodHandler.methodReceived(ConnectionCloseMethodHandler.java:91)
at org.wso2.andes.client.handler.ClientMethodDispatcherImpl.dispatchConnectionClose(ClientMethodDispatcherImpl.java:192)
at org.wso2.andes.framing.amqp_0_91.ConnectionCloseBodyImpl.execute(ConnectionCloseBodyImpl.java:140)
at org.wso2.andes.client.state.AMQStateManager.methodReceived(AMQStateManager.java:111)
at org.wso2.andes.client.protocol.AMQProtocolHandler.methodBodyReceived(AMQProtocolHandler.java:517)
at org.wso2.andes.client.protocol.AMQProtocolSession.methodFrameReceived(AMQProtocolSession.java:467)
at org.wso2.andes.framing.AMQMethodBodyImpl.handle(AMQMethodBodyImpl.java:96)
at org.wso2.andes.client.protocol.AMQProtocolHandler$2.run(AMQProtocolHandler.java:468)
at org.wso2.andes.pool.Job.processAll(Job.java:109)
at org.wso2.andes.pool.Job.run(Job.java:153)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
... 1 more
2016/08/29 17:56:39 ERROR - jmeter.protocol.jms.sampler.SubscriberSampler: Could not initialise client javax.jms.JMSException: Error registering consumer: org.wso2.andes.AMQConnectionClosedException: Error: Subscription ID: carbon:${id} cannot contain any of following symbols ~!@#;%^*()+={}|<>"', and space. " / " can only use as the tenant separator
[error code 541: internal error]
at org.wso2.andes.client.AMQSession$6.execute(AMQSession.java:2143)
at org.wso2.andes.client.AMQSession$6.execute(AMQSession.java:2086)
at org.wso2.andes.client.AMQConnectionDelegate_8_0.executeRetrySupport(AMQConnectionDelegate_8_0.java:324)
at org.wso2.andes.client.AMQConnection$3.run(AMQConnection.java:655)
at java.security.AccessController.doPrivileged(Native Method)
at org.wso2.andes.client.AMQConnection.executeRetrySupport(AMQConnection.java:652)
at org.wso2.andes.client.failover.FailoverRetrySupport.execute(FailoverRetrySupport.java:102)
at org.wso2.andes.client.AMQSession.createConsumerImpl(AMQSession.java:2084)
at org.wso2.andes.client.AMQSession.createConsumer(AMQSession.java:1072)
at org.wso2.andes.client.AMQSession.createDurableSubscriber(AMQSession.java:1226)
at org.wso2.andes.client.AMQSession.createDurableSubscriber(AMQSession.java:1121)
at org.apache.jmeter.protocol.jms.client.ReceiveSubscriber.createSubscriber(ReceiveSubscriber.java:284)
at org.apache.jmeter.protocol.jms.client.ReceiveSubscriber.<init>(ReceiveSubscriber.java:239)
at org.apache.jmeter.protocol.jms.client.ReceiveSubscriber.<init>(ReceiveSubscriber.java:115)
at org.apache.jmeter.protocol.jms.sampler.SubscriberSampler.initReceiveClient(SubscriberSampler.java:126)
at org.apache.jmeter.protocol.jms.sampler.SubscriberSampler.threadStarted(SubscriberSampler.java:298)
at org.apache.jmeter.threads.JMeterThread$ThreadListenerTraverser.addNode(JMeterThread.java:647)
at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:996)
at org.apache.jorphan.collections.HashTree.traverse(HashTree.java:978)
at org.apache.jmeter.threads.JMeterThread.threadStarted(JMeterThread.java:616)
at org.apache.jmeter.threads.JMeterThread.initRun(JMeterThread.java:604)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:237)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.wso2.andes.AMQConnectionClosedException: Error: Subscription ID: carbon:${id} cannot contain any of following symbols ~!@#;%^*()+={}|<>"', and space. " / " can only use as the tenant separator
[error code 541: internal error]
at org.wso2.andes.client.handler.ConnectionCloseMethodHandler.methodReceived(ConnectionCloseMethodHandler.java:91)
at org.wso2.andes.client.handler.ClientMethodDispatcherImpl.dispatchConnectionClose(ClientMethodDispatcherImpl.java:192)
at org.wso2.andes.framing.amqp_0_91.ConnectionCloseBodyImpl.execute(ConnectionCloseBodyImpl.java:140)
at org.wso2.andes.client.state.AMQStateManager.methodReceived(AMQStateManager.java:111)
at org.wso2.andes.client.protocol.AMQProtocolHandler.methodBodyReceived(AMQProtocolHandler.java:517)
at org.wso2.andes.client.protocol.AMQProtocolSession.methodFrameReceived(AMQProtocolSession.java:467)
at org.wso2.andes.framing.AMQMethodBodyImpl.handle(AMQMethodBodyImpl.java:96)
at org.wso2.andes.client.protocol.AMQProtocolHandler$2.run(AMQProtocolHandler.java:468)
at org.wso2.andes.pool.Job.processAll(Job.java:109)
at org.wso2.andes.pool.Job.run(Job.java:153)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
... 1 more
2016/08/29 17:56:39 INFO - jmeter.services.FileServer: Stored: training.csv
2016/08/29 17:56:39 INFO - jmeter.threads.JMeterThread: Thread is done: DueTopic1 - Node 1- Sub 1 1-1
2016/08/29 17:56:39 INFO - jmeter.threads.JMeterThread: Thread finished: DueTopic1 - Node 1- Sub 1 1-1
2016/08/29 17:56:39 INFO - jmeter.engine.StandardJMeterEngine: Notifying test listeners of end of test
2016/08/29 17:56:39 INFO - jmeter.services.FileServer: Close: training.csv
2016/08/29 17:56:39 INFO - jmeter.protocol.jms.client.InitialContextFactory: InitialContextFactory.close() called and Context instances cleaned up
2016/08/29 17:56:39 INFO - jmeter.gui.util.JMeterMenuBar: setRunning(false,*local*)
Make sure that the csv dataset config is placed in correct place. Ideally under the thread group.
Also if it's failing to read the value from csv file, you should see some error logged in jmeter.log file or if you enable logs on JMeter UI. If it says something related to csv file, that will help you debug further. Normally keep the csv file in same folder where your jmx resides and just mention the filename.csv in CSV dataset config.