Skip to content

Springwolf Cloud Stream - Duplicate key issue if publisher and subscriber have a same topic #415

@SheheryarAamir

Description

@SheheryarAamir

Describe the bug
Springwolf Cloud Stream - Duplicate key issue if publisher and subscriber have a same topic.

for instance we have below spring configuration for Publish and Subscribe. In this case class CloudStreamFunctionChannelsScanner scan method will throw duplicate exception. as its trying to map topic as a key and in below case topic name is same topic_A. ideally it should merge ChannelItem and setPublish for publisher and setSubscribe for subscriber.

# Binding configuration for publisher
spring.cloud.stream.bindings.createEvent-out-0.destination=topic_A

# Binding configuration for subscriber
spring.cloud.stream.bindings.consumeEvent-in-0.destination=topic_A

Dependencies and versions used
For example, springwolf-cloud-stream-plugin version 0.15.1.

Stack trace and error logs
Duplicate key topic_A (attempted merging values ChannelItem(ref=null, description=null, servers=null, subscribe=Operation(operationId=topic_A_subscribe_createEvent, summary=null, description=Auto-generated description, security=null, tags=null, externalDocs=null, bindings={googlepubsub=ExtendableObject(extensionFields=null)}, traits=null, message=Message(schemaFormat=application/vnd.oai.openapi+json;version=3.0.0, messageId=null, name=org.springframework.messaging.Message, title=Message, description=null, payload=PayloadReference($ref=#/components/schemas/Message), headers=HeaderReference($ref=#/components/schemas/HeadersNotDocumented), bindings={googlepubsub=ExtendableObject(extensionFields=null)})), publish=null, parameters=null, bindings={googlepubsub=ExtendableObject(extensionFields=null)}) and ChannelItem(ref=null, description=null, servers=null, subscribe=null, publish=Operation(operationId=topic_A_publish_consumeEvent, summary=null, description=Auto-generated description, security=null, tags=null, externalDocs=null, bindings={googlepubsub=ExtendableObject(extensionFields=null)}, traits=null, message=Message(schemaFormat=application/vnd.oai.openapi+json;version=3.0.0, messageId=null, name=org.springframework.messaging.Message, title=Message, description=null, payload=PayloadReference($ref=#/components/schemas/Message), headers=HeaderReference($ref=#/components/schemas/HeadersNotDocumented), bindings={googlepubsub=ExtendableObject(extensionFields=null)})), parameters=null, bindings={googlepubsub=ExtendableObject(extensionFields=null)}))

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions