Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

Problem with BlazeDS and dynamic destinations


Level 1

I'm trying to, instead of using messaging-config.xml, create
the destination through the Java code, so that the users can
dynamically subscribe to the newly created destinations.

Here is my Java code:

public void createDest() {

MessageBroker msgBroker =

MessageService service = (MessageService)

MessageDestination d =

NetworkSettings ns = new NetworkSettings();






The following method is called in actionscript once the
creationComplete is triggered:

private function run() {


var consumer:Consumer = new Consumer();

consumer.destination = "test";




The first line calls the method which creates the
destination. It is really created and started (its isValid() and
isStarted() methods return true)

However when I run the code I encounter the following error
(which points to the "consumer.subscribe();" line):

[MessagingError message='Destination 'test' either does not
exist or the destination has no channels defined (and the
application does not define any default channels.)']

None of the items the error message is complaining about are
true. Destination 'test' does exist, it has a channel (shown in the
Java code) and also in the messaging-config.xml a default channel
is defined:


<channel ref="my-polling-amf"/>


It also should be mentioned if I change the "test" to any
destination that is explicitly defined in the messaging-config.xml
it would work. (Instead of actionscript I also tried doing the same
thing in mxml to no avail).

I would appreciate any help to resolve this issue.
0 Replies