Closed yabinmeng closed 3 years ago
Do you have Pulsar client in the classpath together with the jms client?
It looks like there is some mismatch in the classpath
My build.gradle file is this:
dependencies {
// https://mvnrepository.com/artifact/com.datastax.oss/pulsar-jms
implementation group: 'com.datastax.oss', name: 'pulsar-jms', version: '1.1.0'
// https://mvnrepository.com/artifact/org.apache.pulsar/pulsar-client
implementation group: 'org.apache.pulsar', name: 'pulsar-client', version: '2.7.2'
...
I'm running the program from inside Intellij.
You're right.
Pulsar JMS has dependency on Pulsar 2.8.0. My application includes dependency on Pulsar 2.7.2. It looks like these two have conflicts.
If you need to have 2.7.2 you have to use an older version of the jms client. Unfortunately Pulsar 2.8.0 has some internal breaking changes and it is not possible to support both of the major versions.
BTW you can use any version if the JMS client with any Pulsar with version >= 2.6.2 (if you are not using transactions, because in 2.8.0 the wire protocol changed regarding transactions, because in 2.7 they were still beta)
I'm testing Pulsar JMS against a Pulsar 2.7. 2 cluster (with authentication and authorization enabled).
The JMS configuration is as below:
The application code is simple as this:
The above application fails when trying to create the JMS Context
The exception is as below: