activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JavyRocks <>
Subject Re: No IConnectionFactory implementation found for connection URI: activemq:tcp://localhost:61616
Date Thu, 11 Apr 2013 15:39:40 GMT
Active MQ
Hi Every One

I Hope this would help someone

In order to connect to an ActiveMQ Broker from .NET aplication using VB
language for really newbies 

Follow this Steps

1. Download Java JDK from this link

2. Install and configure the JAVA_HOME variable

3. Download the ActiveMQ Server  5.8
4. Follow the installation guide

5 Download the NMS DLLs 1.4.0

6. Start the server

7. Create a new project in Visual Studio targetting the 3.5 FrameWork

8. Add these References to the project
                 ActiveMQ 1.4\build\net-3.5\debug
                 ActiveMQ 1.4\lib\Apache.NMS\net-3.5

Use this code

Imports Apache.NMS
Imports Apache.NMS.ActiveMQ
Imports Apache.NMS.Util

Module Module1

    Sub Main()
        Call Verificar_Reportes_ActiveMQ()
    End Sub

    Public Function Verificar_Reportes_ActiveMQ() As Boolean

            Dim conConexion As Uri
            Dim cofConnector As IConnectionFactory
            conConexion = New Uri("activemq:tcp://localhost:61616")
            'conConexion = New Uri(Me.objGeneral.DireccionMQ & ":" &
            cofConnector = New NMSConnectionFactory(conConexion)

            console.Text = "About to connect to " + conConexion.ToString

            'Using objConexion As IConnection =
cofConnector.CreateConnection("admin", "admin")
            Using objConexion As IConnection =
                Using objSesion As ISession = objConexion.CreateSession()

                    Dim objDestino As IDestination =
SessionUtil.GetDestination(objSesion, "queue://FOO.BAR")

                    Using objConsumidor As IMessageConsumer =
                        Using objProductor As IMessageProducer =

                            Dim objSolicitud As ITextMessage =
objSesion.CreateTextMessage("Javy Rocks")
                            objSolicitud.NMSCorrelationID = "abc"
                            objSolicitud.Properties("NMSXGroupID") =
                            objSolicitud.Properties("myHeader") =


                            Dim objMensajeRespuesta As ITextMessage =

                            If Not IsNothing(objMensajeRespuesta) Then
                                MsgBox("Mensaje Recibido = " &
                            End If

                        End Using
                    End Using
                End Using
            End Using

            Return True
        Catch ex As Exception
            MsgBox("Error" & ex.Message)
            Return False
        End Try

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message