whebreak.blogg.se

Xojo exit celledit
Xojo exit celledit












Log "Expected header!" Exit End If Dim p As Dictionary = frame.MethodDecoded Log "Method: " + RabbitMQConnectionMBS.MethodName(frame.MethodID)Ĭonst AMQP_BASIC_DELIVER_METHOD = &h003C003C If frame.MethodID AMQP_BASIC_DELIVER_METHOD Then Continue end if Dim d As Dictionary = frame.MethodDecodedĭim delivery_tag As Int64 = d.Value( "deliveryTag")ĭim exchange As String = d.Value( "exchange")ĭim routing_key As String = d.Value( "routingKey") If result frame.kFrameMethod Then Continue end if While True Dim result As Integer = conn.SimpleWaitFrame(frame) If Failed(r) Then Return dim frame as new RabbitMQFrameMBS If Failed(r) Then Return // wait an answer Const noLocal = False Const noAck = False Const ConsumerTag = "" Call conn.BasicConsume(channel, ReplyQueueName, ConsumerTag, noLocal, noAck, exclusive, arguments) Props.CorrelationId = "1" // publish Dim BasicPublishResult As Integer Const mandatory = False Const immediate = FalseīasicPublishResult = conn.BasicPublish(channel, InputExchange, InputRoutingkey, mandatory, immediate, props, InputMessageBody) Props.DeliveryMode = 2 // persistent delivery mode Props.Flags = props.kFlagContentType or props.kFlagDeliveryMode or props.kFlagReplyTo or props.kFlagCorrelationId send the message Dim props As New RabbitMQBasicPropertiesMBS If Failed(r) Then Return Dim ReplyQueueName As String = QueueDeclareResult.Value( "Queue") QueueDeclareResult = conn.QueueDeclare(channel, queue, passive, durable, exclusive, autoDelete, arguments)

xojo exit celledit xojo exit celledit

If Failed(r) Then Return // create Private reply_to queue Dim QueueDeclareResult As DictionaryĬonst passive = False Const durable = False Const exclusive = False Const autoDelete = True Dim arguments As Dictionary = Nil const queue = "" If Failed(r) Then Return Const channel = 1 Call conn.ChannelOpen(channel)

xojo exit celledit

MsgBox "Failed to open TCP socket" Return End If Dim r As RabbitMQRPCReplyMBS MsgBox "Failed to create TCP socket" Return End If Dim status As Integer Const hostname = "192.168.2.70" Const port = 5672 Const InputExchange = "test" Const InputRoutingkey = "test" Const InputMessageBody = "Hello World" Dim conn As New RabbitMQConnectionMBS














Xojo exit celledit