Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.8.0
-
None
-
Unknown
Description
TCP writer can connect only to splunk server, where its local port is the same as its "outside" port.
Example:
- Splunk server is running via docker. It contains tcp port input definition for e.g. 9998. Port is mapped via docker to e.g. 12345
- If I use remote tcp port 9998, camel component tries to connect to host:9998, which fails.
- If I use 12346 as remote port. Splunk server fails, because it doesn't know port 12345
The same can be stated also for hostname.
Problem is caused in this method: https://github.com/apache/camel/blob/master/components/camel-splunk/src/main/java/org/apache/camel/component/splunk/support/TcpDataWriter.java#L40
I'd suggest to add new confguration property `tcpLocalReceiverPort`. Which could be used in this case.
- If `tcpLocalReceiverPort` is defined, component will use this poer value for splunk, but will use `tcpReceiverPort` for real connection.
- Functionality of `tcpReceiverPort` won't change in case of missing `tcpLocalReceiverPort`.
For hostname there is no need to define a new property, because there is already a `host`, which could be used in this case.
Attachments
Issue Links
- links to