Skip to content

AdtMessageListenerContainer doesn't support durable named consumer. [DATAJDBC-42] #298

@spring-projects-issues

Description

@spring-projects-issues

Lukasz Rzeszotarski opened DATAJDBC-42 and commented

Current implementation of
org.springframework.data.jdbc.jms.listener.oracle.AdtMessageListenerContainer
doesn't support durableSubscribers. Even if you try define so in spring context definition by using

<jms:listener-container connection-factory="connectionFactory"
	client-id="LUKAS"
	cache="test"
	container-class="org.springframework.data.jdbc.jms.listener.oracle.AdtMessageListenerContainer"
	destination-type="durableTopic">
	<jms:listener destination="TEST_QUEUE" 
		ref="messageDelegate" method="handleMessage" subscription="LUKAS" />
</jms:listener-container>	

I think in AdtMessageListenerContainer#createConsumer should be sth like:

if (durable) {
return ((AQjmsSession) session).createDurableSubscriber(topic, consumerName, null, false, new OraDataFactory());
} else {
return ((AQjmsSession) session).createConsumer(destination, null, new OraDataFactory(), null, false);
}

Another problem is that without extending AdtMessageListenerContainer you cannot through <jms:listener-container /> definition define consumer name. Because "client-id" and "subscription" parameters are not mapped to consumer name which is what I see randomly generated by oracle aqapi. In some case it would be nice to have possiblity to set up name of the durable consumer when you are using ADT payloads.


Affects: Ext 1.0 RELEASE

Metadata

Metadata

Assignees

Labels

in: coreIssues in core supporttype: bugA general bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions