attached broker.xml and master-datasources.xml files
On Wed, May 20, 2015 at 11:31 PM, Hemika Kodikara <[email protected]> wrote:
> Hi Amalka,
>
> Can you attach the broker.xml file and master-datasources.xml files ?
>
> Regards,
> Hemika
>
> Hemika Kodikara
> Software Engineer
> WSO2 Inc.
> lean . enterprise . middleware
> http://wso2.com
>
> Mobile : +94777688882
>
> On Wed, May 20, 2015 at 10:54 PM, Amalka Subasinghe <[email protected]>
> wrote:
>
>> I'm using M7 pack. but I have to create the databases manually.
>>
>> On Wed, May 20, 2015 at 10:51 PM, Indika Sampath <[email protected]>
>> wrote:
>>
>>> Hi Amalka,
>>>
>>> You don't need to externally run db script. Below set of tables created
>>> when you start MB 3.0.0 pack with -Dsetup option. Which milestone pack did
>>> you configure ?
>>>
>>> MB_BINDING
>>> MB_CONTENT
>>> MB_DURABLE_SUBSCRIPTION
>>> MB_EXCHANGE
>>> MB_EXPIRATION_DATA
>>> MB_METADATA
>>> MB_NODE
>>> MB_QUEUE
>>> MB_QUEUE_COUNTER
>>> MB_QUEUE_MAPPING
>>>
>>> Cheers!
>>>
>>> On Wed, May 20, 2015 at 10:14 PM, Amalka Subasinghe <[email protected]>
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> I'm trying to setup MB cluster with 2 MB nodes. When I start the MB
>>>> node with -Dsetup following error was thrown.
>>>> Do I need to create tables manually for wso2_mb (MB store db)?
>>>>
>>>> 2015-05-20 22:01:04,676] ERROR
>>>> {org.wso2.andes.server.registry.ApplicationRegistry} -
>>>> org.wso2.andes.kernel.AndesException: Error occurred while retrieving all
>>>> queue information.
>>>> Exception during startup: java.lang.Exception:
>>>> org.wso2.andes.kernel.AndesException: Error occurred while retrieving all
>>>> queue information.
>>>> java.lang.Exception: org.wso2.andes.kernel.AndesException: Error
>>>> occurred while retrieving all queue information.
>>>> at
>>>> org.wso2.andes.server.registry.ApplicationRegistry.initialise(ApplicationRegistry.java:266)
>>>> at
>>>> org.wso2.andes.server.registry.ApplicationRegistry.initialise(ApplicationRegistry.java:147)
>>>> at org.wso2.andes.server.Broker.startupImpl(Broker.java:147)
>>>> at org.wso2.andes.server.Broker.startup(Broker.java:108)
>>>> at org.wso2.andes.server.Main.startBroker(Main.java:218)
>>>> at org.wso2.andes.server.Main.execute(Main.java:207)
>>>> at org.wso2.andes.server.Main.<init>(Main.java:48)
>>>> at org.wso2.andes.server.Main.main(Main.java:41)
>>>> at
>>>> org.wso2.carbon.andes.internal.QpidServiceComponent.startAndesBroker(QpidServiceComponent.java:324)
>>>> at
>>>> org.wso2.carbon.andes.internal.QpidServiceComponent.setHazelcastInstance(QpidServiceComponent.java:226)
>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>> at
>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>>> at
>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>> at java.lang.reflect.Method.invoke(Method.java:606)
>>>> at
>>>> org.eclipse.equinox.internal.ds.model.ComponentReference.bind(ComponentReference.java:376)
>>>> at
>>>> org.eclipse.equinox.internal.ds.model.ServiceComponentProp.bindReference(ServiceComponentProp.java:432)
>>>> at
>>>> org.eclipse.equinox.internal.ds.InstanceProcess.dynamicBind(InstanceProcess.java:416)
>>>> at
>>>> org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:334)
>>>> at
>>>> org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:222)
>>>> at
>>>> org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107)
>>>> at
>>>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
>>>> at
>>>> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
>>>> at
>>>> org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
>>>> at
>>>> org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)
>>>> at
>>>> org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771)
>>>> at
>>>> org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
>>>> at
>>>> org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214)
>>>> at
>>>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433)
>>>> at
>>>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:451)
>>>> at
>>>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:950)
>>>> at
>>>> org.wso2.carbon.core.clustering.hazelcast.HazelcastClusteringAgent.init(HazelcastClusteringAgent.java:223)
>>>> at
>>>> org.wso2.carbon.core.util.ClusteringUtil.enableClustering(ClusteringUtil.java:38)
>>>> at
>>>> org.wso2.carbon.core.internal.StartupFinalizerServiceComponent.completeInitialization(StartupFinalizerServiceComponent.java:174)
>>>> at
>>>> org.wso2.carbon.core.internal.StartupFinalizerServiceComponent.serviceChanged(StartupFinalizerServiceComponent.java:285)
>>>> at
>>>> org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107)
>>>> at
>>>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
>>>> at
>>>> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
>>>> at
>>>> org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
>>>> at
>>>> org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)
>>>> at
>>>> org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771)
>>>> at
>>>> org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
>>>> at
>>>> org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214)
>>>> at
>>>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433)
>>>> at
>>>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:451)
>>>> at
>>>> org.wso2.carbon.throttling.agent.internal.ThrottlingAgentServiceComponent.registerThrottlingAgent(ThrottlingAgentServiceComponent.java:123)
>>>> at
>>>> org.wso2.carbon.throttling.agent.internal.ThrottlingAgentServiceComponent.activate(ThrottlingAgentServiceComponent.java:100)
>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>> at
>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>>> at
>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>> at java.lang.reflect.Method.invoke(Method.java:606)
>>>> at
>>>> org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:260)
>>>> at
>>>> org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146)
>>>> at
>>>> org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:347)
>>>> at
>>>> org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:620)
>>>> at
>>>> org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:197)
>>>> at
>>>> org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:343)
>>>> at
>>>> org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:222)
>>>> at
>>>> org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107)
>>>> at
>>>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
>>>> at
>>>> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
>>>> at
>>>> org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
>>>> at
>>>> org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)
>>>> at
>>>> org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771)
>>>> at
>>>> org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
>>>> at
>>>> org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214)
>>>> at
>>>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433)
>>>> at
>>>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:451)
>>>> at
>>>> org.wso2.carbon.core.init.CarbonServerManager.initializeCarbon(CarbonServerManager.java:517)
>>>> at
>>>> org.wso2.carbon.core.init.CarbonServerManager.start(CarbonServerManager.java:219)
>>>> at
>>>> org.wso2.carbon.core.internal.CarbonCoreServiceComponent.activate(CarbonCoreServiceComponent.java:88)
>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>> at
>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>>> at
>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>> at java.lang.reflect.Method.invoke(Method.java:606)
>>>> at
>>>> org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:260)
>>>> at
>>>> org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146)
>>>> at
>>>> org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:347)
>>>> at
>>>> org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:620)
>>>> at
>>>> org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:197)
>>>> at
>>>> org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:343)
>>>> at
>>>> org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:222)
>>>> at
>>>> org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107)
>>>> at
>>>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
>>>> at
>>>> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
>>>> at
>>>> org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
>>>> at
>>>> org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)
>>>> at
>>>> org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771)
>>>> at
>>>> org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
>>>> at
>>>> org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214)
>>>> at
>>>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433)
>>>> at
>>>> org.eclipse.equinox.http.servlet.internal.Activator.registerHttpService(Activator.java:81)
>>>> at
>>>> org.eclipse.equinox.http.servlet.internal.Activator.addProxyServlet(Activator.java:60)
>>>> at
>>>> org.eclipse.equinox.http.servlet.internal.ProxyServlet.init(ProxyServlet.java:40)
>>>> at
>>>> org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.init(DelegationServlet.java:38)
>>>> at
>>>> org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1279)
>>>> at
>>>> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1192)
>>>> at
>>>> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087)
>>>> at
>>>> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5210)
>>>> at
>>>> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5493)
>>>> at
>>>> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>>>> at
>>>> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
>>>> at
>>>> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
>>>> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>>>> at
>>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>>>> at
>>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>>>> at java.lang.Thread.run(Thread.java:745)
>>>> Caused by: org.wso2.andes.kernel.AndesException: Error occurred while
>>>> retrieving all queue information.
>>>> at
>>>> org.wso2.andes.store.rdbms.RDBMSAndesContextStoreImpl.getAllQueuesStored(RDBMSAndesContextStoreImpl.java:697)
>>>> at
>>>> org.wso2.andes.kernel.AndesKernelBoot.recoverMapsForEachQueue(AndesKernelBoot.java:133)
>>>> at
>>>> org.wso2.andes.kernel.AndesKernelBoot.recoverDistributedSlotMap(AndesKernelBoot.java:116)
>>>> at
>>>> org.wso2.andes.server.virtualhost.VirtualHostImpl.<init>(VirtualHostImpl.java:210)
>>>> at
>>>> org.wso2.andes.server.virtualhost.VirtualHostImpl.<init>(VirtualHostImpl.java:155)
>>>> at
>>>> org.wso2.andes.server.registry.ApplicationRegistry.createVirtualHost(ApplicationRegistry.java:568)
>>>> at
>>>> org.wso2.andes.server.registry.ApplicationRegistry.initialiseVirtualHosts(ApplicationRegistry.java:327)
>>>> at
>>>> org.wso2.andes.server.registry.ApplicationRegistry.initialise(ApplicationRegistry.java:261)
>>>> ... 105 more
>>>> Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:
>>>> Table 'wso2_mb.MB_QUEUE' doesn't exist
>>>> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
>>>> Method)
>>>> at
>>>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
>>>> at
>>>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>>>> at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
>>>> at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
>>>> at com.mysql.jdbc.Util.getInstance(Util.java:386)
>>>> at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1054)
>>>> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4237)
>>>> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4169)
>>>> at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2617)
>>>> at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2778)
>>>> at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2825)
>>>> at
>>>> com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2156)
>>>> at
>>>> com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2323)
>>>> at
>>>> org.wso2.andes.store.rdbms.RDBMSAndesContextStoreImpl.getAllQueuesStored(RDBMSAndesContextStoreImpl.java:684)
>>>> ... 112 more
>>>>
>>>>
>>>> Thanks
>>>> Amalka
>>>>
>>>>
>>>
>>>
>>> --
>>> Indika Sampath
>>> Senior Software Engineer
>>> WSO2 Inc.
>>> http://wso2.com
>>>
>>> Phone: +94 716 424 744
>>> Blog: http://indikasampath.blogspot.com/
>>>
>>>
>>
>>
>> --
>>
>> Amalka Subasinghe
>> Senior Software Engineer
>> WSO2 Inc.
>> Mobile: +94 77 9401267
>>
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
--
Amalka Subasinghe
Senior Software Engineer
WSO2 Inc.
Mobile: +94 77 9401267
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
~ Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
~
~ WSO2 Inc. licenses this file to you under the Apache License,
~ Version 2.0 (the "License"); you may not use this file except
~ in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->
<!-- This is the root configuration file of WSO2 Message Broker (MB). Links to configurations of
associated libraries are also specified here.
[Note for developers] - If you intend to rename or modify a property name, remember to update
relevant, org.wso2.andes.configuration.enums.AndesConfiguration, enum value using the Xpath
expression of the property. -->
<broker>
<!--Paths of externally organized configurations specific to Andes component (Qpid configurations
are referred by Qpid component separately. (MB_HOME/repository/conf/advanced/qpid-config.xml)-->
<links>
</links>
<coordination>
<!-- You can override the cluster node identifier of this MB node using the nodeID.
If it is left as "default", the default node ID will be generated for it. (Using IP + UUID).
The node ID of each member should ALWAYS be unique.-->
<nodeID>default</nodeID>
<!-- Thrift is used to maintain and sync slot (message groups) ranges between MB nodes. -->
<thriftServerHost>localhost</thriftServerHost>
<thriftServerPort>7611</thriftServerPort>
</coordination>
<!-- You can enable/disable specific messaging transports in this section. By default all
transports are enabled. This section also allows you to customize the messaging flows used
within WSO2 MB. NOT performance related, but logic related. -->
<transports>
<!-- In a clustered setup this should be updated with the IP address of this node
Setting the value to 127.0.0.1 in a clustered setup is wrong. Please note that this is
the address exposed by the server. NOT the hostname inferred from carbon.xml -->
<bindAddress>127.0.0.1</bindAddress>
<amqp enabled="true">
<!-- most of the AMQP configurations reside in qpid-config.xml since we inherit the Qpid
messaging model during AMQP.-->
<port>5672</port>
<sslPort>8672</sslPort>
<sendExpiredMessagesToDLC>false</sendExpiredMessagesToDLC>
<maximumRedeliveryAttempts>10</maximumRedeliveryAttempts>
<allowSharedTopicSubscriptions>false</allowSharedTopicSubscriptions>
</amqp>
<mqtt enabled="true">
<port>1883</port>
<!-- put proper default SSL port -->
<sslPort>8883</sslPort>
<!-- These two properties are temporary. Ideally, MQTT should use carbon users. -->
<!--Ring buffer size of MQTT inbound event disruptor. Default is set to 32768 (1024 * 32)
Having a large ring buffer will have a increase memory usage and will improve performance
and vise versa -->
<inboundBufferSize>32768</inboundBufferSize>
<!--Ring buffer size of MQTT delivery event disruptor. Default is set to 32768 (1024 * 32)
Having a large ring buffer will have a increase memory usage and will improve performance
and vise versa -->
<deliveryBufferSize>32768</deliveryBufferSize>
<security>
<!--
Instructs the MQTT server whether clients should always send credentials
when establishing a connection.
Possible values:
OPTIONAL: This is the default value. MQTT clients may or may not send
credentials. If a client sends credentials server will
validates it.
If client doesn't send credentials then server will not
authenticate, but allows client to establish the connection.
This behavior adheres to MQTT 3.1 specification.
REQUIRED: Clients should always provide credentials when connecting.
If client doesn't send credentials or they are invalid
server rejects the connection.
-->
<authentication>OPTIONAL</authentication>
<!--Class name of the authenticator to use. class should
inherit from org.dna.mqtt.moquette.server.IAuthenticator
Note: default implementation authenticates against carbon user store
based on supplied username/password
-->
<authenticator>org.wso2.carbon.andes.authentication.andes.CarbonBasedMQTTAuthenticator</authenticator>
</security>
</mqtt>
</transports>
<!-- Depending on the database type selected in master-datasources.xml, you must enable the
relevant Data access classes here. Currently supported stores are RDBMS(any RDBMS store) and
Cassandra(CQL, Hector). These stores are accessed for two purposes.
1. For message persistence ("messageStore")
2. To persist and access other information relevant to messaging protocols.("contextStore").-->
<!-- By default WSO2 MB runs with H2 persistent store. If you plan to use a different
store, point to the relevant dataSource or uncomment the database appropriately.
RDBMS
=====
If you are running an RDBMS you can use the existing RDBMS implementation of stores
by pointing to the correct data source by updating the property "dataSource".
Data source entry should be present in
<MB_HOME>/repository/conf/datasources/master-datasources.xml.
Cassandra
=========
For Cassandra depending on the driver (CQL or Hector) you use to connect to data store
uncomment the relevant entry and COMMENT out the RDBMS entry.
Update the <MB_HOME>/repository/conf/datasources/master-datasources.xml with Cassandra
data source and update "dataSource" property for stores here.
-->
<persistence>
<!-- RDBMS MB Store Configuration -->
<messageStore class="org.wso2.andes.store.rdbms.RDBMSMessageStoreImpl">
<property name="dataSource">WSO2MBStoreDB</property>
</messageStore>
<contextStore class="org.wso2.andes.store.rdbms.RDBMSAndesContextStoreImpl">
<property name="dataSource">WSO2MBStoreDB</property>
</contextStore>
<!-- H2 Based In-Memory Store Configuration -->
<!--
<messageStore class="org.wso2.andes.store.rdbms.h2.H2MemMessageStoreImpl">
</messageStore>
<contextStore class="org.wso2.andes.store.rdbms.h2.H2MemAndesContextStoreImpl">
</contextStore>
-->
<!-- External Cassandra Store Configuration -->
<!-- NOTE: Update the master-datasources.xml file to connect to Cassandra data source
READ the documentation to set advanced Cassandra tuning parameters.
Advanced Tuning Parameters.
gcGraceSeconds:
Specifies the time to wait before garbage collecting tombstones (deletion markers).
Defaults to 864000, or 10 days, which allows a great deal of time for consistency
to be achieved prior to deletion. In many deployments this interval can be reduced,
and in a single-node cluster it can be safely set to zero
Replication strategy class:
Strategy to determine the physical location of nodes to replication and their proximity
to each other
Replication factor:
replication is the process of storing copies of data on multiple nodes to ensure
reliability and fault tolerance. This value specify how many copies of same data should
persisted.
Read consistency level:
Specifies how many replicas must respond to a read request before returning data
Valid values are 'ONE','ALL','EACH_QUORUM','QUORUM','ONE','TWO','THREE','ANY'
Write consistency level:
Determines the number of replicas on which the write must succeed before returning an
acknowledgement Valid values are
'ONE','ALL','EACH_QUORUM','QUORUM','ONE','TWO','THREE','ANY' -->
<!--CQL Based MB stores-->
<!--
<messageStore class="org.wso2.andes.store.cassandra.CQLBasedMessageStoreImpl">
<property name="dataSource">WSO2MBStoreDB</property>
<property name="keyspace">MB_KEYSPACE</property>
<property name="gcGraceSeconds">864000</property>
<property name="strategyClass">org.apache.cassandra.locator.SimpleStrategy</property>
<property name="replicationFactor">1</property>
<property name="readConsistencyLevel">ONE</property>
<property name="writeConsistencyLevel">ONE</property>
</messageStore>
<contextStore class="org.wso2.andes.store.cassandra.CQLBasedAndesContextStoreImpl">
<property name="dataSource">WSO2MBStoreDB</property>
<property name="keyspace">MB_KEYSPACE</property>
<property name="strategyClass">org.apache.cassandra.locator.SimpleStrategy</property>
<property name="replicationFactor">1</property>
<property name="readConsistencyLevel">ONE</property>
<property name="writeConsistencyLevel">ONE</property>
</contextStore>
-->
<!--Hector based MB stores-->
<!--
<messageStore class="org.wso2.andes.store.cassandra.HectorBasedMessageStoreImpl">
<property name="dataSource">WSO2MBStoreDB</property>
<property name="keyspace">MB_KEYSPACE</property>
<property name="gcGraceSeconds">864000</property>
<property name="strategyClass">org.apache.cassandra.locator.SimpleStrategy</property>
<property name="replicationFactor">1</property>
<property name="readConsistencyLevel">ONE</property>
<property name="writeConsistencyLevel">ONE</property>
</messageStore>
<contextStore class="org.wso2.andes.store.cassandra.HectorBasedAndesContextStoreImpl">
<property name="dataSource">WSO2MBStoreDB</property>
<property name="keyspace">MB_KEYSPACE</property>
<property name="gcGraceSeconds">864000</property>
<property name="strategyClass">org.apache.cassandra.locator.SimpleStrategy</property>
<property name="replicationFactor">1</property>
<property name="readConsistencyLevel">ONE</property>
<property name="writeConsistencyLevel">ONE</property>
</contextStore>
-->
<!-- This class decides how unique IDs are generated for the MB node. This id generator is
expected to be thread safe and a implementation of interface
org.wso2.andes.server.cluster.coordination.MessageIdGenerator
NOTE: This is NOT used in MB to generate message IDs. -->
<idGenerator>org.wso2.andes.server.cluster.coordination.TimeStampBasedMessageIdGenerator</idGenerator>
</persistence>
<!-- Alter the flow that is triggered during a node fail -->
<failoverBehaviour>
</failoverBehaviour>
<!-- This section allows you to tweak memory and processor allocations used by WSO2 MB.
Broken down by critical processes so you have a clear view of which parameters to change in
different scenarios. -->
<performanceTuning>
<slots>
<!--maximum time interval where slot can be retain in memory before updating to the
cluster, in milliseconds -->
<slotRetainTimeInMemory>1000</slotRetainTimeInMemory>
<!--rough estimate for size of a slot-->
<windowSize>1000</windowSize>
<!--Number of SlotDeliveryWorker threads that should be started-->
<workerThreadCount>5</workerThreadCount>
</slots>
<delivery>
<!-- Maximum number of undelivered messages that can have in memory. Increasing this
value increase the possibility of out of memory scenario but performance will be
improved -->
<maxNumberOfReadButUndeliveredMessages>1000</maxNumberOfReadButUndeliveredMessages>
<!-- This is the ring buffer size of the delivery disruptor. This value should be a
power of 2 (E.g. 1024, 2048, 4096). Use a small ring size if you want to reduce the
memory usage. -->
<ringBufferSize>4096</ringBufferSize>
<!--Number of parallel readers used to used to read content from message store.
Increasing this value will speed-up the message sending mechanism. But the load
on the data store will increase. -->
<parallelContentReaders>5</parallelContentReaders>
<!-- Number of parallel delivery handlers used to send messages to subscribers.
Increasing this value will speed-up the message sending mechanism. But the system load
will increase. -->
<parallelDeliveryHandlers>5</parallelDeliveryHandlers>
<!-- The size of the batch represents, at a given time the number of messages that could
be retrived from the database. -->
<contentReadBatchSize>65000</contentReadBatchSize>
</delivery>
<ackHandling>
<!--Number of message acknowledgement handlers to process acknowledgements concurrently.
These acknowledgement handlers will batch and process acknowledgements. -->
<ackHandlerCount>1</ackHandlerCount>
<!--Maximum batch size of the acknowledgement handler. Andes process acknowledgements in
batches using Disruptor Increasing the batch size reduces the number of calls made to
database by MB. Depending on the database optimal batch size this value should be set.
Batches will be of the maximum batch size mostly in high throughput scenarios.
Underlying implementation use Disruptor for batching hence will batch message at a
lesser value than this in low throughput scenarios -->
<ackHandlerBatchSize>100</ackHandlerBatchSize>
<!-- Message delivery from server to the client will be paused temporarily if number of
delivered but unacknowledged message count reaches this size. Should be set considering
message consume rate. This is to avoid overwhelming slow subscribers. -->
<maxUnackedMessages>1000</maxUnackedMessages>
</ackHandling>
<inboundEvents>
<!--Number of parallel writers used to write content to message store. Increasing this
value will speed-up the message receiving mechanism. But the load on the data store will
increase.-->
<parallelMessageWriters>1</parallelMessageWriters>
<!--Size of the Disruptor ring buffer for inbound event handling. For publishing at
higher rates increasing the buffer size may give some advantage on keeping messages in
memory and write.
NOTE: Buffer size should be a value of power of two -->
<bufferSize>65536</bufferSize>
<!--Maximum batch size of the batch write operation for inbound messages. MB internals
use Disruptor to batch events. Hence this batch size is set to avoid database requests
with high load (with big batch sizes) to write messages. This need to be configured in
high throughput messaging scenarios to regulate the hit on database from MB -->
<messageWriterBatchSize>70</messageWriterBatchSize>
<!--Timeout for waiting for a queue purge event to end to get the purged count. Doesn't affect actual purging.
If purge takes time, increasing the value will improve the possibility of retrieving the correct purged count.
Having a lower value doesn't stop purge event. Getting the purged count is affected by this
-->
<purgedCountTimeout>180</purgedCountTimeout>
</inboundEvents>
<failover>
<!-- Virtual host sync interval seconds in for the Virtual host syncing Task which will
sync the Virtual host details across the cluster -->
<vHostSyncTaskInterval>3600</vHostSyncTaskInterval>
</failover>
<messageExpiration>
<checkInterval>10000</checkInterval>
<messageBatchSize>1000</messageBatchSize>
</messageExpiration>
<messageCounter>
<!-- Message counter tasks delay between the termination of one execution and the
commencement of the next in seconds -->
<counterTaskInterval>5</counterTaskInterval>
<!-- Message count is updated in batches. Once the count exceed the batch size message
count update is moved to message count update task. -->
<countUpdateBatchSize>100</countUpdateBatchSize>
</messageCounter>
<!-- Code specific parameters to ensure messages get deleted as fast as possible without
disturbing other processes.-->
<messageDeletion>
<!-- This is the Task interval (SECONDS) for the content removal task which will remove
the actual message content from the store in the background. If the message rate is very
high, users can set this to a lower value to minimise the delete requests per task. -->
<contentRemovalTaskInterval>3</contentRemovalTaskInterval>
</messageDeletion>
<!--
SIMPLE - Default Selector Mechanism
BITMAPS - BitMaps
When using the subscriptions and topics in large quantity, BitMaps are faster than
the existing ones
-->
<topicMatching>SIMPLE</topicMatching>
</performanceTuning>
<!-- This section is about how you want to view messaging statistics from the admin console and
how you plan to interact with it. -->
<managementConsole>
<!--Maximum number of messages to be fetched using Andes message browser when browsing
queues -->
<messageBatchSizeForBrowserSubscriptions>200</messageBatchSizeForBrowserSubscriptions>
<!-- This property defines the maximum message content length that can be displayed at the
management console when browsing queues. If the message length exceeds the value, a
truncated content will be displayed with a statement "message content too large to display."
at the end. default value is 100000 (can roughly display a 100KB message.)
* NOTE : Increasing this value could cause delays when loading the message content page.-->
<maximumMessageDisplayLength>100000</maximumMessageDisplayLength>
</managementConsole>
<!-- Memory and resource exhaustion is something we should prevent and recover from.
This section allows you to specify the threshold at which to reduce/stop frequently intensive
operations within MB temporarily. -->
<flowControl>
<!-- This is the global buffer limits which enable/disable the flow control globally -->
<global>
<lowLimit>800</lowLimit>
<highLimit>8000</highLimit>
</global>
<!-- This is the channel specific buffer limits which enable/disable the flow control
locally -->
<bufferBased>
<lowLimit>100</lowLimit>
<highLimit>1000</highLimit>
</bufferBased>
<memoryBased>
<memoryCheckInterval>20000</memoryCheckInterval>
<globalMemoryThresholdRatio>1.0</globalMemoryThresholdRatio>
<globalMemoryRecoveryThresholdRatio>1.0</globalMemoryRecoveryThresholdRatio>
</memoryBased>
<connectionBased>
<perConnectionMessageThreshold>1000</perConnectionMessageThreshold>
</connectionBased>
</flowControl>
</broker>
<datasources-configuration>
<providers>
<provider>org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader</provider>
<!-- uncomment either one of the following entry when use external cassandra depending on data source (CQL or Hector) -->
<!--<provider>org.wso2.carbon.cassandra.datareader.cql.CassandraDataSourceReader</provider>-->
<!--<provider>org.wso2.carbon.cassandra.datareader.hector.HectorBasedDataSourceReader</provider>-->
</providers>
<datasources>
<datasource>
<name>REGISTRY_DB</name>
<description>The datasource used for registry- config/governance</description>
<jndiConfig>
<name>jdbc/WSO2RegistryDB</name>
</jndiConfig>
<definition type="RDBMS">
<configuration>
<url>jdbc:mysql://localhost:3306/REGISTRY_DB?autoReconnect=true</url>
<username>root</username>
<password>root</password>
<driverClassName>com.mysql.jdbc.Driver</driverClassName>
<maxActive>50</maxActive>
<maxWait>60000</maxWait>
<testOnBorrow>true</testOnBorrow>
<validationQuery>SELECT 1</validationQuery>
<validationInterval>30000</validationInterval>
</configuration>
</definition>
</datasource>
<!-- For an explanation of the properties, see: http://people.apache.org/~fhanik/jdbc-pool/jdbc-pool.html -->
<!--datasource>
<name>SAMPLE_DATA_SOURCE</name>
<jndiConfig>
<name></name>
<environment>
<property name="java.naming.factory.initial"></property>
<property name="java.naming.provider.url"></property>
</environment>
</jndiConfig>
<definition type="RDBMS">
<configuration>
<defaultAutoCommit></defaultAutoCommit>
<defaultReadOnly></defaultReadOnly>
<defaultTransactionIsolation>NONE|READ_COMMITTED|READ_UNCOMMITTED|REPEATABLE_READ|SERIALIZABLE</defaultTransactionIsolation>
<defaultCatalog></defaultCatalog>
<username></username>
<password svns:secretAlias="WSO2.DB.Password"></password>
<maxActive></maxActive>
<maxIdle></maxIdle>
<initialSize></initialSize>
<maxWait></maxWait>
<dataSourceClassName>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</dataSourceClassName>
<dataSourceProps>
<property name="url">jdbc:mysql://localhost:3306/Test1</property>
<property name="user">root</property>
<property name="password">123</property>
</dataSourceProps>
</configuration>
</definition>
</datasource-->
<datasource>
<name>WSO2_CARBON_DB</name>
<description>The datasource used for registry and user manager</description>
<jndiConfig>
<name>jdbc/WSO2CarbonDB</name>
</jndiConfig>
<definition type="RDBMS">
<configuration>
<url>jdbc:h2:repository/database/WSO2CARBON_DB;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=60000</url>
<username>wso2carbon</username>
<password>wso2carbon</password>
<driverClassName>org.h2.Driver</driverClassName>
<maxActive>50</maxActive>
<maxWait>60000</maxWait>
<testOnBorrow>true</testOnBorrow>
<validationQuery>SELECT 1</validationQuery>
<validationInterval>30000</validationInterval>
</configuration>
</definition>
</datasource>
<!-- WSO2 MB embedded H2 Store -->
<datasource>
<name>WSO2_MB_STORE_DB</name>
<description>The datasource used for message broker database</description>
<jndiConfig>
<name>WSO2MBStoreDB</name>
</jndiConfig>
<definition type="RDBMS">
<configuration>
<url>jdbc:h2:repository/database/WSO2MB_DB;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=60000</url>
<driverClassName>org.h2.Driver</driverClassName>
<maxActive>50</maxActive>
<maxWait>60000</maxWait>
<testOnBorrow>true</testOnBorrow>
<validationQuery>SELECT 1</validationQuery>
<validationInterval>30000</validationInterval>
</configuration>
</definition>
</datasource>
<!-- WSO2 MB in memory store -->
<datasource>
<name>WSO2_MB_IN_MEMORY_STORE_DB</name>
<jndiConfig>
<name>WSO2MBInMemoryStoreDB</name>
</jndiConfig>
<definition type="RDBMS">
<configuration>
<url>jdbc:h2:mem:msg_store;DB_CLOSE_DELAY=-1</url>
<driverClassName>org.h2.Driver</driverClassName>
</configuration>
</definition>
</datasource>
<!-- external Cassandra data source. please enable either one of datasource (CQL or Hector) based on your preference -->
<!-- CQL datasource -->
<!--
<datasource>
<name>WSO2_CASSANDRA_DB</name>
<description>The datasource used for cassandra</description>
<jndiConfig>
<name>WSO2MBStoreDB</name>
</jndiConfig>
<definition type="CASSANDRA">
<configuration>
<async>false</async>
<clusterName>TestCluster</clusterName>
<compression>SNAPPY</compression>
<concurrency>100</concurrency>
<username>admin</username>
<password encrypted="true">admin</password>
<port>9042</port>
<maxConnections>100</maxConnections>
<hosts>
<host>localhost</host>
</hosts>
<loadBalancePolicy>
<exclusionThreshold>2.5</exclusionThreshold>
<latencyAware>true</latencyAware>
<minMeasure>100</minMeasure>
<policyName>RoundRobinPolicy</policyName>
<retryPeriod>10</retryPeriod>
<scale>2</scale>
</loadBalancePolicy>
<poolOptions>
<coreConnectionsForLocal>7</coreConnectionsForLocal>
<coreConnectionsForRemote>1</coreConnectionsForRemote>
<maxConnectionsForLocal>10</maxConnectionsForLocal>
<maxConnectionsForRemote>10</maxConnectionsForRemote>
<maxSimultaneousRequestsForLocal>10</maxSimultaneousRequestsForLocal>
<maxSimultaneousRequestsForRemote>10</maxSimultaneousRequestsForRemote>
<minSimultaneousRequestsForLocal>10</minSimultaneousRequestsForLocal>
<minSimultaneousRequestsForRemote>10</minSimultaneousRequestsForRemote>
</poolOptions>
<reconnectPolicy>
<baseDelayMs>100</baseDelayMs>
<policyName>ConstantReconnectionPolicy</policyName>
</reconnectPolicy>
<socketOptions>
<connectTimeoutMillis>10000</connectTimeoutMillis>
<keepAlive>true</keepAlive>
<readTimeoutMillis>15000</readTimeoutMillis>
<tcpNoDelay>true</tcpNoDelay>
</socketOptions>
</configuration>
</definition>
</datasource>
-->
<!-- Hector datasource -->
<!--
<datasource>
<name>HectorDS</name>
<description>The datasource used for RSS metadata repository</description>
<jndiConfig>
<name>WSO2MBStoreDB</name>
</jndiConfig>
<definition type="HECTOR">
<configuration>
<hosts>localhost:9160</hosts>
<username>admin</username>
<password>admin</password>
<clusterName>TestCluster</clusterName>
<maxActive>200</maxActive>
<enableSecurity>false</enableSecurity>
</configuration>
</definition>
</datasource>
-->
<!-- end of external Cassandra data sources. -->
<!-- MySQL data source -->
<datasource>
<name>MYSQL_DATA_SOURCE</name>
<jndiConfig>
<name>WSO2MBStoreDB</name>
</jndiConfig>
<definition type="RDBMS">
<configuration>
<driverClassName>com.mysql.jdbc.Driver</driverClassName>
<url>jdbc:mysql://localhost:3306/wso2_mb</url>
<username>root</username>
<password>root</password>
<maxActive>50</maxActive>
<maxWait>60000</maxWait>
<minIdle>5</minIdle>
<testOnBorrow>true</testOnBorrow>
<validationQuery>SELECT 1</validationQuery>
<validationInterval>30000</validationInterval>
</configuration>
</definition>
</datasource>
<!-- MSSQL server -->
<!-- Please enable any one of the following datasource based on your MSSQL driver library -->
<!-- JTDS datasource -->
<!--
<datasource>
<name>WSO2_MB_STORE_DB</name>
<jndiConfig>
<name>WSO2MBStoreDB</name>
</jndiConfig>
<definition type="RDBMS">
<configuration>
<url>jdbc:jtds:sqlserver://localhost:1433/wso2_mb</url>
<username>sa</username>
<password>sa</password>
<driverClassName>net.sourceforge.jtds.jdbc.Driver</driverClassName>
<maxActive>200</maxActive>
<maxWait>60000</maxWait>
<minIdle>5</minIdle>
<testOnBorrow>true</testOnBorrow>
<validationQuery>SELECT 1</validationQuery>
<validationInterval>30000</validationInterval>
</configuration>
</definition>
</datasource>
-->
<!-- SQLServerXA datasource -->
<!--
<datasource>
<name>WSO2_MB_STORE_DB</name>
<jndiConfig>
<name>WSO2MBStoreDB</name>
</jndiConfig>
<definition type="RDBMS">
<configuration>
<dataSourceClassName>com.microsoft.sqlserver.jdbc.SQLServerXADataSource</dataSourceClassName>
<dataSourceProps>
<property name = "URL">jdbc:sqlserver://localhost\SQLExpress:1433</property>
<property name="databaseName">wso2_mb</property>
<property name="user">sa</property>
<property name="password">sa</property>
</dataSourceProps>
</configuration>
</definition>
</datasource>
-->
<!--
<datasource>
<name>ORACLE_DATA_SOURCE</name>
<jndiConfig>
<name>WSO2MBStoreDB</name>
</jndiConfig>
<definition type="RDBMS">
<configuration>
<driverClassName>oracle.jdbc.driver.OracleDriver</driverClassName>
<url>jdbc:oracle:thin:@localhost:1521/orcl</url>
<maxActive>100</maxActive>
<maxWait>60000</maxWait>
<minIdle>5</minIdle>
<testOnBorrow>true</testOnBorrow>
<validationQuery>SELECT 1 FROM DUAL</validationQuery>
<validationInterval>30000</validationInterval>
<username>scott</username>
<password>tiger</password>
</configuration>
</definition>
</datasource>
-->
</datasources>
</datasources-configuration>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev