Hi Franta,

Sleepycat is not required to run Qpid Broker-J 7.0.
You can ran Qpid Broker-J 7.0 using Derby or JDBC message stores instead of BDB.
You just need to provide an initial virtualHostInitialConfiguration
where type of Virtual host is set to DERBY or JDBC. For example,
"virtualHostInitialConfiguration" : "{\"type\": \"DERBY\",
\"nodeAutoCreationPolicies\":
[{\"patterns\":\".*\",\"createdOnPublish\":\"true\",\"createdOnConsume\":\"true\",\"nodeType\":\"queue\",\"attributes\":{}}]
}"

The content of virtualHostInitialConfiguration is essentially a
template with virtual host configuration. Anything,  which can be
added into virtual host configuration, can be specified here.
When Virtual Host is instantiated for a first time, the entries
defined in virtualHostInitialConfiguration are automatically added
into Virtual Host configuration.
You can simply create test JSON virtual host node, add your queues
there and copy the configuration for queues into
virtualHostInitialConfiguration.

Kind Regards,
Alex

On 11 June 2018 at 10:09, frantisek haas <frantisek.h...@gmail.com> wrote:
> Hi Alex,
>
> Thanks a lot for all these details.
>
> I'll give this a try. Also, your examples look very useful for I've been
> using qpid-broker instead of qpid-broker-core to embed the broker.
>
> I've created my sample code a while ago and when trying to migrate to 7.0 I
> had troubles getting some com.sleepycat.je dependency from our company
> Nexus.
>
> Actually, is the syntax / semantics of virtualHostInitialConfiguration
> documented anywhere?
>
> Regards,
> Franta
>
>
> On Wed, Jun 6, 2018 at 11:12 PM, Oleksandr Rudyy <oru...@gmail.com> wrote:
>
>> Franta,
>>
>> Are there any specific reasons why do you prefer to use version 6.1.6 over
>> 7.0?
>> I would strongly suggest using 7.0 as AMQP 1.0 layer there was
>> significantly reworked and a number of improvements and bug fixes have
>> been implemented.
>>
>> Kind Regards,
>> Alex
>>
>> On 6 June 2018 at 00:55, Oleksandr Rudyy <oru...@gmail.com> wrote:
>> > Hi Franta,
>> >
>> > A wiki at [1] illustrates how to embed Qpid Broker-J 7.x.
>> > I while ago I attached a couple of examples how to embed 6.x to JIRA
>> > [2]. I am not sure how useful they can be.
>> >
>> > You can define the required queues and exchanges as part of virtual
>> > host node attribute "virtualHostInitialConfiguration" in the  Broker
>> > initial configuration.
>> > The entities defined in "virtualHostInitialConfiguration" will be
>> > added into the Virtual Host on its creation.
>> >
>> > Please note that JMS topics are modelled in Qpid as temporary queues
>> > bound to exchange. You can declare an exchange on the Broker for your
>> > topic and temporary queue will be created automatically on attaching
>> > JMS client subscriber. For example, you can create a fanout exchange
>> > with name "MY_TOPIC" and create a subscriber to JMS topic "MY_TOPIC"
>> > in your application.
>> > You can configure ExclusivityPolicy to CONNECTION on your queues using
>> > queue attribute "exclusive" for your exclusivity requirements.
>> >
>> > You can check Broker documentation [3] for more information about
>> > exchanges and queues.
>> >
>> > JMS session acknowledge mode AUTO_ACKNOWLEDGE can be used to have
>> > al-least-once message delivery.
>> > JMS transactions should give you a reliable message delivery.
>> >
>> > If the JMS client doesnt fit your needs, you can try using vert.x java
>> > client [4]. Please have a look at HelloWorld example at [5].
>> >
>> > If you would like to have Web Management console in your embedded
>> > Broker, you need to add dojotoolkit zip into your application
>> > classpath
>> >
>> > <dependency>
>> >   <groupId>org.dojotoolkit</groupId>
>> >   <artifactId>dojo</artifactId>
>> >   <version>1.10.3</version>
>> >   <classifier>distribution</classifier>
>> >   <type>zip</type>
>> > </dependency>
>> >
>> > Kind Regards,
>> > Alex
>> >
>> >
>> > [1] https://cwiki.apache.org/confluence/display/qpid/How+
>> to+embed+Qpid+Broker-J
>> > [2] https://issues.apache.org/jira/browse/QPID-7747
>> > [3] http://qpid.apache.org/releases/qpid-broker-j-7.0.4/book/index.html
>> > [4] https://github.com/vert-x3/vertx-proton/blob/3.5.2/src/
>> main/asciidoc/java/index.adoc#using-vertx-proton
>> > [5] https://github.com/vert-x3/vertx-proton/blob/3.5.2/src/
>> test/java/io/vertx/proton/example/HelloWorld.java
>> >
>> > On 4 June 2018 at 17:33, frantisek haas <frantisek.h...@gmail.com>
>> wrote:
>> >> Hi All,
>> >>
>> >> I'm trying to use the embedded qpid broker-j. I can start the broker and
>> >> connect to it using the qpid-jms-client.
>> >>
>> >> a) I was wondering if I can start the broker with some initial
>> topic/queue
>> >> configuration? For instance, I would like to have topic TA, topic TB,
>> topic
>> >> TC and queue Q1 and queue Q2. Messages sent to TA, TB should end up in
>> Q1
>> >> and TC in Q2. Apart from some other attributes I would like the Q2 to be
>> >> exclusive so that it can work like sort of mutex where only one client
>> can
>> >> be connected to it at the same time. Messages to be generally delivered
>> at
>> >> least once. Is this possible?
>> >>
>> >> b) Is there any specific AMQP 1.0 (not JMS) java client you would
>> suggest
>> >> me to use?
>> >>
>> >> c) I'm having problems accessing the web management console. QPID logo
>> and
>> >> login button show up but nothing works. Some dojo.js files etc. seem to
>> be
>> >> missing. Is this a known issue / expected behavior?
>> >>
>> >> Thanks,
>> >> Franta
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
>> For additional commands, e-mail: users-h...@qpid.apache.org
>>
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org

Reply via email to