Cannot access hostname property of

19 views
Skip to first unread message

Михаил Ельников

unread,
Sep 30, 2017, 11:33:46 AM9/30/17
to rabbitmq-users
Hello everyone!
I`m trying to create connection using .net assembly in Microsoft Dynamics NAV, like it described here
https://www.rabbitmq.com/releases/rabbitmq-dotnet-client/v3.6.0/rabbitmq-dotnet-client-3.6.0-client-htmldoc/html/type-RabbitMQ.Client.ConnectionFactory.html

RMQConnectionFactory := RMQConnectionFactory.ConnectionFactory();
WITH RMQConnectionFactory DO BEGIN
  UserName := 'xxx';
  Password := 'xxxxxxx';
  VirtualHost := 'mdms';
  hostname :=  'http://rabbitmq-dev.mixana.com'
...
RMQIConnection := RMQConnectionFactory.CreateConnection();
Everything is OK, except that there is no hostname property in RMQConnectionFactory variable.
Is it obsolete or something?

----------------------------

When I tried to use
  Type := GETDOTNETTYPE(DotNetIList);
  Type := Type.MakeGenericType(DotNetIList);   //Error appears: A call to System.RuntimeType.MakeGenericType failed with this message: The type of one or more arguments does not match the method's parameter type.
  DotNetIList := Activator.CreateInstance(Type);
  DotNetIList.Add('http://rabbitmq-dev.mixana.com');
  RMQIConnection := RMQConnectionFactory.CreateConnection(DotNetIList,''); //Error appears: The function call was ambiguous. No matching method was found.


Can anyone help, how should I create connection?

Михаил Ельников

unread,
Sep 30, 2017, 11:44:31 AM9/30/17
to rabbitmq-users
Ops, theme meant to be "Cannot access hostname property of RMQConnectionFactory .net assembly
(RMQConnectionFactory stands for  RabbitMQ.Client.ConnectionFactory.'RabbitMQ.Client, Version=3.6.12.0, Culture=neutral, PublicKeyToken=89e7d7c5feba84ce')

Михаил Ельников

unread,
Sep 30, 2017, 11:48:49 AM9/30/17
to rabbitmq-users
Used material
https://www.rabbitmq.com/dotnet-api-guide.html
where clearly said:
factory.HostName = hostName;

Michael Klishin

unread,
Oct 1, 2017, 4:03:53 PM10/1/17
to rabbitm...@googlegroups.com
The guide covers the most recent version of RabbitMQ .NET client, which is 5.x:

We highly recommend upgrading the client from 3.6.12. There aren't that many breaking changes,
the list of improvements is fairly non-trivial and you don't have to upgrade the server as long as you run at least RabbitMQ 2.0.

.NET client release notes can be found at https://github.com/rabbitmq/rabbitmq-dotnet-client/releases.

I will add a note to the guide that mentions what version is covered.


--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
MK

Staff Software Engineer, Pivotal/RabbitMQ
Reply all
Reply to author
Forward
0 new messages