Yes, in general, you need to create a new connection for each thread. You do not have control over how the operating system executes temporary streams of threads (regardless of the definition of your own critical partitions), so you may inadvertently use multiple threads trying to send data on the same channel.
Please note that this applies to any network messages. For example, if you have two streams that are trying to share the same socket with an HTTP connection.
- Topic 1 makes a request
- Topic 2 makes a request
- Thread 1 reads bytes from the socket, unwittingly reading the response from the request for thread 2
, , begin/commit, . , JDBC.
( ), , . . , ( StackOverflow).
update:. , ( - InterBase/Firebird).
. .
, API, JDBC ODBC, , .