danieleteti / delphistompclient

STOMP client for Embarcadero Delphi and FreePascal.
141 stars 64 forks source link

Virtual host missing on Connect Methode #11

Open vuolp opened 8 years ago

vuolp commented 8 years ago

For connecting to a virtual host on RabbitMQ I miss a parameter for the virtual host name on method TStompClient.Connect.

For a test I have add a parameter host to the header in your code:

if STOMP_Version_1_1 in [FClientAcceptProtocolVersion] then
begin
    Frame.GetHeaders.Add('heart-beat', '0,1000'); // stomp 1.1
    Frame.GetHeaders.Add('accept-version', '1.1'); // stomp 1.1
    Frame.GetHeaders.Add('host', virtualhost); // stomp 1.1
end;

With this modification I can send messages to the right virtual host on my RabbitMQ.

danieleteti commented 8 years ago

Good, thank you.