Griffin-yang opened a new issue, #9923:
URL: https://github.com/apache/seatunnel/issues/9923

   ### Search before asking
   
   - [x] I had searched in the 
[issues](https://github.com/apache/seatunnel/issues?q=is%3Aissue+label%3A%22bug%22)
 and found no similar issues.
   
   
   ### What happened
   
   **Description**
   
   In the current SeaTunnel 2.3.12 release, the RabbitMQ connector has several 
configuration and functional issues that prevent it from properly connecting to 
certain secured RabbitMQ clusters (especially those using AMQPS and restricted 
queue permissions).
   
   **Problems**
   
   1、Configuration Inconsistency:
   - The official documentation describes the connection parameter as url,but 
in the source code it is defined as uri and not properly referenced internally.
   - This causes confusion and prevents the connector from correctly parsing 
the URL-based configuration.
   
   2、AMQPS Connection Not Triggered via Parameters:
   - Currently, only the url parameter supports triggering amqps mode (SSL/TLS).
   - When using host/port/username/password + virtual_host configuration, the 
connector still connects via AMQP instead of AMQPS, which causes SSL-enabled 
clusters to reject the connection.
   
   3、Queue Declaration Logic Issue:
   - The connector always uses channel.queueDeclare() which actively declares 
(creates) the queue.
   - In environments with limited permissions (e.g., consumers only allowed to 
read existing queues), this results in:
   ` Error while create RMQ client with xxxxx at ip`
   - Consequently, the job fails to start even though the queue already exists.
   
   
   ### SeaTunnel Version
   
   2.3.12
   
   ### SeaTunnel Config
   
   ```conf
   source {
     RabbitMQ {
       host = "ip"
       port = 5671
       virtual_host = "/xxx"
       username = "xxx"
       password = "xxx"
       uri = "amqps://xxx:ip:5671/%2Fxxx"
       queue_name = "xxx"
       format = "text"
     }
   }
   ```
   
   ### Running Command
   
   ```shell
   apache-seatunnel-2.3.12/bin/seatunnel.sh --config 
apache-seatunnel-2.3.12/config/rabbitmq_test.conf --master local
   ```
   
   ### Error Exception
   
   ```log
   2025-10-03 17:19:30,961 ERROR [o.a.s.e.s.d.p.PhysicalVertex  ] 
[hz.main.seaTunnel.task.thread-2] - Job (1026423208464613377), Pipeline: 
[(1/1)], task: [pipeline-1 [Source[0]-RabbitMQ]-SourceTask (1/1)], 
taskGroupLocation: [TaskGroupLocation{jobId=1026423208464613377, pipelineId=1, 
taskGroupId=2}] end with state FAILED and Exception: 
org.apache.seatunnel.connectors.seatunnel.rabbitmq.exception.RabbitmqConnectorException:
 ErrorCode:[RABBITMQ-02], ErrorDescription:[create rabbitmq client failed] - 
Error while create RMQ client with xxxxx at ip
           at 
org.apache.seatunnel.connectors.seatunnel.rabbitmq.client.RabbitmqClient.<init>(RabbitmqClient.java:69)
           at 
org.apache.seatunnel.connectors.seatunnel.rabbitmq.source.RabbitmqSourceReader.<init>(RabbitmqSourceReader.java:82)
           at 
org.apache.seatunnel.connectors.seatunnel.rabbitmq.source.RabbitmqSource.createReader(RabbitmqSource.java:81)
           at 
org.apache.seatunnel.engine.server.task.flow.SourceFlowLifeCycle.init(SourceFlowLifeCycle.java:124)
           at 
org.apache.seatunnel.engine.server.task.SeaTunnelTask.init(SeaTunnelTask.java:131)
           at 
org.apache.seatunnel.engine.server.task.SourceSeaTunnelTask.init(SourceSeaTunnelTask.java:72)
           at 
org.apache.seatunnel.engine.server.TaskExecutionService$BlockingWorker.run(TaskExecutionService.java:677)
           at 
org.apache.seatunnel.engine.server.TaskExecutionService$NamedTaskWrapper.run(TaskExecutionService.java:1008)
           at 
org.apache.seatunnel.api.tracing.MDCRunnable.run(MDCRunnable.java:43)
           at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
           at java.util.concurrent.FutureTask.run(FutureTask.java:266)
           at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
           at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
           at java.lang.Thread.run(Thread.java:748)
   Caused by: java.io.IOException
           at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:129)
           at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:125)
           at 
com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:396)
           at 
com.rabbitmq.client.impl.recovery.RecoveryAwareAMQConnectionFactory.newConnection(RecoveryAwareAMQConnectionFactory.java:64)
           at 
com.rabbitmq.client.impl.recovery.AutorecoveringConnection.init(AutorecoveringConnection.java:156)
           at 
com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1130)
           at 
com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1087)
           at 
com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1045)
           at 
com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1207)
           at 
org.apache.seatunnel.connectors.seatunnel.rabbitmq.client.RabbitmqClient.<init>(RabbitmqClient.java:59)
           ... 13 more
   Caused by: com.rabbitmq.client.ShutdownSignalException: connection error
           at 
com.rabbitmq.utility.ValueOrException.getValue(ValueOrException.java:66)
           at 
com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java:36)
           at 
com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.getReply(AMQChannel.java:502)
           at 
com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:326)
           ... 20 more
   Caused by: java.io.EOFException
           at java.io.DataInputStream.readUnsignedByte(DataInputStream.java:290)
           at com.rabbitmq.client.impl.Frame.readFrom(Frame.java:91)
           at 
com.rabbitmq.client.impl.SocketFrameHandler.readFrame(SocketFrameHandler.java:184)
           at 
com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:665)
           ... 1 more
   ```
   
   ### Zeta or Flink or Spark Version
   
   none
   
   ### Java or Scala Version
   
   jdk8 or jdk11
   
   ### Screenshots
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [x] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to