Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dispatcher has not subscribers when using reactive=true #334

Open
Mrc0113 opened this issue May 23, 2023 · 0 comments
Open

Dispatcher has not subscribers when using reactive=true #334

Mrc0113 opened this issue May 23, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@Mrc0113
Copy link
Contributor

Mrc0113 commented May 23, 2023

Describe the bug

"Dispatcher has no subscribers" error when using the --reactive=true. This does not occur if using --reactive=false

How to Reproduce

Steps to reproduce the issue. Attach all resources that can help us understand the issue:

  1. Generate code: ag -o CustomerNotification -p binder=solace -p reactive=true -p artifactId=CustomerNotification -p groupId=CustomerNotification -p javaPackage=CustomerNotification -p host=tcp://localhost:55555 -p username=solace-cloud-client -p password=yourpassword -p msgVpn=yourvpn ./CustomerNotification-0.1.0.yaml @asyncapi/java-spring-cloud-stream-template using this asyncapi file:
---
components:
  schemas:
    Flight Status:
      x-ep-schema-version: "0.1.0"
      x-ep-schema-version-id: "y7n5fn16lv6"
      x-ep-schema-state-name: "DRAFT"
      x-ep-schema-name: "Flight Status"
      type: "object"
      x-ep-application-domain-id: "rc80mv6avog"
      required:
      - "flightNumber"
      - "status"
      - "source"
      - "dest"
      x-ep-schema-version-displayname: ""
      x-ep-shared: "true"
      x-ep-application-domain-name: "Airline"
      x-ep-schema-state-id: "1"
      x-ep-schema-id: "28wqbhpc9x6"
      properties:
        source:
          type: "string"
        dest:
          type: "string"
        flightNumber:
          type: "string"
        status:
          type: "string"
  messages:
    Flight Delayed:
      x-ep-event-id: "gvr6k99vkx2"
      x-ep-event-version-displayname: ""
      description: ""
      x-ep-application-domain-id: "rc80mv6avog"
      schemaFormat: "application/vnd.aai.asyncapi+json;version=2.0.0"
      x-ep-event-state-name: "DRAFT"
      x-ep-shared: "true"
      x-ep-application-domain-name: "Airline"
      x-ep-event-version-id: "myoalnksnup"
      payload:
        $ref: "#/components/schemas/Flight Status"
      x-ep-event-version: "0.1.0"
      x-ep-event-name: "Flight Delayed"
      contentType: "application/json"
      x-ep-event-state-id: "1"
channels:
  alaska/flight/{flight_num}/delayed:
    publish:
      bindings:
        solace:
          destinations:
          - destinationType: "queue"
            queue:
              name: "CUST_NOTIF"
              topicSubscriptions:
              - "alaska/flight/*/delayed"
          bindingVersion: "0.3.0"
      message:
        $ref: "#/components/messages/Flight Delayed"
    parameters:
      flight_num:
        schema:
          type: "string"
        x-ep-parameter-name: "flight_num"
asyncapi: "2.5.0"
info:
  x-ep-application-version: "0.1.0"
  x-ep-application-version-id: "ng7p4bv4zd2"
  x-ep-application-id: "9e75623ykba"
  x-ep-state-name: "DRAFT"
  title: "CustomerNotification"
  x-ep-application-domain-id: "rc80mv6avog"
  version: "0.1.0"
  x-ep-state-id: "1"
  x-ep-application-domain-name: "Airline"
  1. Start app mvnw spring-boot:run
  2. Publish message {"flightNumber":"ASA106","status":"delayed","source":"FAI","dest":"SEA"} using try-me
  3. You should see something similar to the error below:
2023-04-25 14:21:49.207  WARN 740 --- [pool-4-thread-1] s.b.i.RetryableInboundXMLMessageListener : Failed to consume a message from destination #P2P/QTMP/v:developerproductionrk2ibwbcev9solaceprimary0/scst/an/00d826c8-771f-4f69-8e76-65f22e13d6c7/plain/alaska/flight/_/delayed - attempt 1
2023-04-25 14:21:50.215  WARN 740 --- [pool-4-thread-1] s.b.i.RetryableInboundXMLMessageListener : Failed to consume a message from destination #P2P/QTMP/v:developerproductionrk2ibwbcev9solaceprimary0/scst/an/00d826c8-771f-4f69-8e76-65f22e13d6c7/plain/alaska/flight/_/delayed - attempt 2
2023-04-25 14:21:52.230  WARN 740 --- [pool-4-thread-1] s.b.i.RetryableInboundXMLMessageListener : Failed to consume a message from destination #P2P/QTMP/v:developerproductionrk2ibwbcev9solaceprimary0/scst/an/00d826c8-771f-4f69-8e76-65f22e13d6c7/plain/alaska/flight/_/delayed - attempt 3
2023-04-25 14:21:52.232 ERROR 740 --- [pool-4-thread-1] o.s.integration.handler.LoggingHandler   : org.springframework.messaging.MessageDeliveryException: Dispatcher has no subscribers for 
channel 'application.alaskaFlightFlightNumDelayedConsumer-in-0'.; nested exception is org.springframework.integration.MessageDispatchingException: Dispatcher has no subscribers, failedMessage=GenericMessage [payload={"flightNumber":"ASA1132","status":"delayed","source":"KSEA","dest":"KSFO"}, headers={JMS_IBM_Character_Set=UTF-8, solace_destination=alaska/flight/flight-num/delayed, JMS_IBM_Encoding=546, jms_timestamp=1682450508330, JMS_IBM_PutApplType=28, target-protocol=kafka, JMS_IBM_Format=MQSTR   , skip-input-type-conversion=false, JMSXDeliveryCount=1, solace_discardIndication=false, solace_dmqEligible=true, solace_priority=4, JMS_IBM_PutTime=19214833, id=624148fd-7942-fc25-12bb-308e9eb6b1db, contentType=application/json, jms_expiration=0, jms_messageId=ID:414d5120514d312020202020202020206a16476401fc0040, timestamp=1682450509205, JMS_IBM_MsgType=8, solace_scst_messageVersion=1, solace_expiration=0, deliveryAttempt=3, JMSXUserID=mqm         , jms_priority=0, solace_timeToLive=0, JMSXAppID=MQ Explorer 9.3.0           , solace_receiveTimestamp=0, jms_redelivered=false, JMS_IBM_PutDate=20230425, acknowledgmentCallback=com.solace.spring.cloud.stream.binder.util.JCSMPAcknowledgementCallbackFactory$JCSMPAcknowledgementCallback@30cd1ab5, jms_deliveryMode=1, solace_redelivered=false}], failedMessage=GenericMessage [payload={"flightNumber":"ASA1132","status":"delayed","source":"KSEA","dest":"KSFO"}, headers={JMS_IBM_Character_Set=UTF-8, solace_destination=alaska/flight/flight-num/delayed, JMS_IBM_Encoding=546, jms_timestamp=1682450508330, JMS_IBM_PutApplType=28, target-protocol=kafka, JMS_IBM_Format=MQSTR   , skip-input-type-conversion=false, JMSXDeliveryCount=1, solace_discardIndication=false, solace_dmqEligible=true, solace_priority=4, JMS_IBM_PutTime=19214833, id=624148fd-7942-fc25-12bb-308e9eb6b1db, contentType=application/json, jms_expiration=0, jms_messageId=ID:414d5120514d312020202020202020206a16476401fc0040, timestamp=1682450509205, JMS_IBM_MsgType=8, solace_scst_messageVersion=1, solace_expiration=0, deliveryAttempt=3, JMSXUserID=mqm        
 , jms_priority=0, solace_timeToLive=0, JMSXAppID=MQ Explorer 9.3.0           , solace_receiveTimestamp=0, jms_redelivered=false, JMS_IBM_PutDate=20230425, acknowledgmentCallback=com.solace.spring.cloud.stream.binder.util.JCSMPAcknowledgementCallbackFactory$JCSMPAcknowledgementCallback@30cd1ab5, jms_deliveryMode=1, solace_redelivered=false}]
        at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:76)
        at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:317)
        at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:272)
        at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:187)
        at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:166)

Expected behavior

A dispatcher should be found and the message should be successfully received :)

@Mrc0113 Mrc0113 added the bug Something isn't working label May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant