Changed core protocol handshake to use ARTEMIS
This commit is contained in:
parent
930df932b3
commit
f07af67632
|
@ -74,6 +74,8 @@ import org.apache.activemq.artemis.utils.VersionLoader;
|
|||
|
||||
public class ActiveMQClientProtocolManager implements ClientProtocolManager
|
||||
{
|
||||
private static final String handshake = "ARTEMIS";
|
||||
|
||||
private final int versionID = VersionLoader.getVersion().getIncrementingVersion();
|
||||
|
||||
private ClientSessionFactoryInternal factoryInternal;
|
||||
|
@ -479,7 +481,6 @@ public class ActiveMQClientProtocolManager implements ClientProtocolManager
|
|||
if (transportConnection.isUsingProtocolHandling())
|
||||
{
|
||||
// no need to send handshake on inVM as inVM is not using the NettyProtocolHandling
|
||||
String handshake = "HORNETQ";
|
||||
ActiveMQBuffer amqbuffer = connection.createTransportBuffer(handshake.length());
|
||||
amqbuffer.writeBytes(handshake.getBytes());
|
||||
transportConnection.write(amqbuffer);
|
||||
|
|
|
@ -185,13 +185,13 @@ class CoreProtocolManager implements ProtocolManager<Interceptor>
|
|||
public void handshake(NettyServerConnection connection, ActiveMQBuffer buffer)
|
||||
{
|
||||
//if we are not an old client then handshake
|
||||
if (buffer.getByte(0) == 'H' &&
|
||||
buffer.getByte(1) == 'O' &&
|
||||
buffer.getByte(2) == 'R' &&
|
||||
buffer.getByte(3) == 'N' &&
|
||||
buffer.getByte(4) == 'E' &&
|
||||
buffer.getByte(5) == 'T' &&
|
||||
buffer.getByte(6) == 'Q')
|
||||
if (buffer.getByte(0) == 'A' &&
|
||||
buffer.getByte(1) == 'R' &&
|
||||
buffer.getByte(2) == 'T' &&
|
||||
buffer.getByte(3) == 'E' &&
|
||||
buffer.getByte(4) == 'M' &&
|
||||
buffer.getByte(5) == 'I' &&
|
||||
buffer.getByte(6) == 'S')
|
||||
{
|
||||
//todo add some handshaking
|
||||
buffer.readBytes(7);
|
||||
|
|
Loading…
Reference in New Issue