[ 
https://issues.apache.org/jira/browse/ARTEMIS-1637?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16369358#comment-16369358
 ] 

Justin Bertram commented on ARTEMIS-1637:
-----------------------------------------

I tried to reproduce this by using the example at 
{{examples/features/standard/database}}.  I commented out the bit from 
{{org.apache.activemq.artemis.jms.example.DBExample}} where the message was 
consumed, and then after I ran the example using {{mvn clean verify}} I changed 
directory into {{target/server0/bin}} and ran {{./artemis data exp}}.  This is 
what was printed:

{noformat}
<?xml version="1.0"?>
<activemq-journal>
   <bindings>
      <address-binding routing-types="MULTICAST" name="activemq.notifications" 
id="2"/>
      <address-binding routing-types="ANYCAST" name="DLQ" id="2147483650"/>
      <address-binding routing-types="ANYCAST" name="ExpiryQueue" 
id="2147483654"/>
      <address-binding routing-types="ANYCAST" name="queue1" id="2147483662"/>
      <queue-binding address="queue1" filter-string="" name="queue1" 
id="2147483664" routing-type="ANYCAST"/>
      <queue-binding address="DLQ" filter-string="" name="DLQ" id="2147483652" 
routing-type="ANYCAST"/>
      <queue-binding address="ExpiryQueue" filter-string="" name="ExpiryQueue" 
id="2147483656" routing-type="ANYCAST"/>
   </bindings>
   <messages>
      <message id="2147483666" priority="4" expiration="0" 
timestamp="1519061625679" type="text" 
user-id="09697385-159b-11e8-bd28-a0afbd82eaba">
         <properties>
            <property name="__AMQ_CID" 
value="095c5422-159b-11e8-bd28-a0afbd82eaba" type="simple-string"/>
            <property name="_AMQ_ROUTING_TYPE" value="1" type="byte"/>
         </properties>
         <queues>
            <queue name="queue1"/>
         </queues>
         <body>
            
<![CDATA[AQAAACx0AGgAaQBzACAAaQBzACAAYQAgAHQAZQB4AHQAIABtAGUAcwBzAGEAZwBlAA==]]>
         </body>
      </message>
   </messages>
{noformat}

> artemis data exp does not work with JDBC store
> ----------------------------------------------
>
>                 Key: ARTEMIS-1637
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-1637
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 2.5.0
>         Environment: apache-artemis-2.5.0-20180111.113938-84-bin
> postgres (PostgreSQL) 10.1
>            Reporter: Jiri Daněk
>            Priority: Major
>
> Prepare database
> {noformat}
> initdb .
> pg_ctl -D . -l logfile start
> createdb test
> {noformat}
> Configure broker (changes from defaul)
> {noformat}
> diff --git a/broker.xml b/broker.xml
> index ea55343..ea5131b 100644
> --- a/broker.xml
> +++ b/broker.xml
> @@ -29,45 +29,16 @@ under the License.
>  
>        <persistence-enabled>true</persistence-enabled>
>  
> -      <!-- this could be ASYNCIO, MAPPED, NIO
> -           ASYNCIO: Linux Libaio
> -           MAPPED: mmap files
> -           NIO: Plain Java Files
> -       -->
> -      <journal-type>NIO</journal-type>
> -
> -      <paging-directory>./data/paging</paging-directory>
> -
> -      <bindings-directory>./data/bindings</bindings-directory>
> -
> -      <journal-directory>./data/journal</journal-directory>
> -
> -      
> <large-messages-directory>./data/large-messages</large-messages-directory>
> -
> -      <journal-datasync>true</journal-datasync>
> -
> -      <journal-min-files>2</journal-min-files>
> -
> -      <journal-pool-files>-1</journal-pool-files>
> -
> -      <journal-file-size>10M</journal-file-size>
> -      
> -      <!--
> -       This value was determined through a calculation.
> -       Your system could perform 0.35 writes per millisecond
> -       on the current journal configuration.
> -       That translates as a sync write every 2864000 nanoseconds.
> -
> -       Note: If you specify 0 the system will perform writes directly to the 
> disk.
> -             We recommend this to be 0 if you are using journalType=MAPPED 
> and ournal-datasync=false.
> -      -->
> -      <journal-buffer-timeout>2864000</journal-buffer-timeout>
> -
> -
> -      <!--
> -        When using ASYNCIO, this will determine the writing queue depth for 
> libaio.
> -       -->
> -      <journal-max-io>1</journal-max-io>
> +      <store>
> +        <database-store>
> +          
> <jdbc-connection-url><![CDATA[jdbc:postgresql://localhost/test]]></jdbc-connection-url>
> +          <bindings-table-name>BINDINGS_TABLE</bindings-table-name>
> +          <message-table-name>MESSAGE_TABLE</message-table-name>
> +          <page-store-table-name>MESSAGE_T</page-store-table-name>
> +          
> <large-message-table-name>LARGE_MESSAGES_TABLE</large-message-table-name>
> +          
> <jdbc-driver-class-name>org.postgresql.Driver</jdbc-driver-class-name>
> +        </database-store>
> +      </store>
>        <!--
>          You can verify the network health of a particular NIC by specifying 
> the <network-check-NIC> element.
>           <network-check-NIC>theNicName</network-check-NIC>
> {noformat}
> Start broker
> {noformat}
> $ bin/artemis run
> [...]
> {noformat}
> Send messages
> {noformat}
> $ java -jar cli-qpid-jms/target/cli-qpid-jms-1.2.2-SNAPSHOT-LATEST.jar sender 
> -b localhost:5672 -a lalaQa --log-msgs dict              
> amqp://localhost:5672
> {'address': 'lalaQa', 'group-id': None, 'subject': None, 'user-id': None, 
> 'correlation-id': None, 'content-encoding': None, 'priority': 4, 'type': 
> None, 'ttl': 0, 'absolute-expiry-time': 0, 'content': None, 'redelivered': 
> False, 'reply-to-group-id': None, 'durable': True, 'delivery-time': 
> 1516831773986, 'group-sequence': '0', 'creation-time': 1516831773986, 
> 'content-type': None, 'id': 'ea29922d-109d-4ed7-a5ef-46c90f756b25:1:1:1-1', 
> 'reply-to': None, 'properties': {'JMSXDeliveryCount': 1}}
> {noformat}
> Stop the broker and attempt to export messages
> {noformat}
> $ bin/artemis data exp
> 2018-01-24 23:10:18,045 WARN  [org.apache.activemq.artemis.core.server] 
> AMQ222018: AIO was not located on this platform, it will fall back to using 
> pure Java NIO. If your platform is Linux, install LibAIO to enable the AIO 
> journal
> 2018-01-24 23:10:18,129 INFO  [org.apache.activemq.artemis.core.server] 
> AMQ221013: Using NIO Journal
> <?xml version="1.0"?>
> <activemq-journal>
>    <bindings>
>    </bindings>
>    <messages>
>    </messages>
> </activemq-journal>
> {noformat}
> No messages are exported.
> (Importing messages into a running broker which is backed by JDBC database 
> does work.)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to