public void export()

in activemq-kahadb-exporter/src/main/java/org/apache/activemq/cli/kahadb/exporter/artemis/ArtemisXmlMetadataExporter.java [51:83]


    public void export() throws IOException {
        store.getDestinations().stream()
        .forEach(dest -> {
            try {
                if (dest.isQueue()) {
                    org.apache.activemq.command.ActiveMQDestination mappedToFQQN = config.mapToDurableSubFQQN(dest);
                    if (dest != mappedToFQQN) {
                        xmlMarshaller.appendBinding(QueueBindingType.builder()
                                                       .withName(CompositeAddress.extractQueueName(mappedToFQQN.getPhysicalName()))
                                                       .withRoutingType(RoutingType.MULTICAST.toString())
                                                       .withAddress(CompositeAddress.extractAddressName(mappedToFQQN.getPhysicalName())).build());
                    } else {
                        xmlMarshaller.appendBinding(QueueBindingType.builder()
                                                       .withName(dest.getPhysicalName())
                                                       .withRoutingType(RoutingType.ANYCAST.toString())
                                                       .withAddress(dest.getPhysicalName()).build());
                    }
                } else if (dest.isTopic()) {
                        for (SubscriptionInfo info :
                            store.createTopicMessageStore((ActiveMQTopic) dest).getAllSubscriptions()) {
                            xmlMarshaller.appendBinding(QueueBindingType.builder()
                                    .withName(ActiveMQDestination.createQueueNameForSubscription(
                                            true, info.getClientId(), info.getSubcriptionName()).toString())
                                    .withRoutingType(RoutingType.MULTICAST.toString())
                                    .withAddress(dest.getPhysicalName()).build());
                        }
                }
            } catch (Exception e) {
                throw new IllegalStateException(e);
            }
        });

    }