ACTIVEMQ6-50 revert any new protocol headers to keep backward compatibility
- revert the FORCED_DELIVERY_MESSAGE back to "_hornetq" - revert handshake header back to 'HORNETQ'
This commit is contained in:
parent
d5359535e7
commit
ff42c217f5
|
@ -63,10 +63,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal
|
|||
|
||||
private static final int NUM_PRIORITIES = 10;
|
||||
|
||||
|
||||
// TODO: We need to set this to _hornetq | activemq based on the version of the protocol
|
||||
// I have added a comment about this at https://issues.apache.org/jira/browse/ACTIVEMQ6-42
|
||||
public static final SimpleString FORCED_DELIVERY_MESSAGE = new SimpleString("_activemq.forced.delivery.seq");
|
||||
public static final SimpleString FORCED_DELIVERY_MESSAGE = new SimpleString("_hornetq.forced.delivery.seq");
|
||||
|
||||
// Attributes
|
||||
// -----------------------------------------------------------------------------------
|
||||
|
|
|
@ -481,7 +481,7 @@ public class ActiveMQClientProtocolManager implements ClientProtocolManager
|
|||
if (transportConnection.isUsingProtocolHandling())
|
||||
{
|
||||
// no need to send handshake on inVM as inVM is not using the NettyProtocolHandling
|
||||
String handshake = "ACTIVEMQ";
|
||||
String handshake = "HORNETQ";
|
||||
ActiveMQBuffer amqbuffer = connection.createBuffer(handshake.length());
|
||||
amqbuffer.writeBytes(handshake.getBytes());
|
||||
transportConnection.write(amqbuffer);
|
||||
|
|
|
@ -166,17 +166,16 @@ class CoreProtocolManager implements ProtocolManager
|
|||
public void handshake(NettyServerConnection connection, ActiveMQBuffer buffer)
|
||||
{
|
||||
//if we are not an old client then handshake
|
||||
if (buffer.getByte(0) == 'A' &&
|
||||
buffer.getByte(1) == 'C' &&
|
||||
buffer.getByte(2) == 'T' &&
|
||||
buffer.getByte(3) == 'I' &&
|
||||
buffer.getByte(4) == 'V' &&
|
||||
buffer.getByte(5) == 'E' &&
|
||||
buffer.getByte(6) == 'M' &&
|
||||
buffer.getByte(7) == 'Q')
|
||||
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')
|
||||
{
|
||||
//todo add some handshaking
|
||||
buffer.readBytes(8);
|
||||
buffer.readBytes(7);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue