Commit Graph
337 Commits
Author SHA1 Message Date
andsel 34a2aca45e Minor, updated copyright date 2018-04-27 20:17:47 +02:00
andsel 033a428184 Fixed checkStyle and ErrorProne warns 2018-04-26 22:23:06 +02:00
Marcus Williford 1bc6bdbbce Fix for CTrie TNode exception and other improvements to CTrie related
subscribe and unsubscribe issues

-  Added unit tests to cover a few more cases which I my system ran into
   under concurrent load testing.
-  Remove and detect TNode, implement more of
   http://bravenewgeek.com/breaking-and-entering-lose-the-lock-while-embracing-concurrency/
   related to TNode state
-  NOTE:  The graph is left with nodes which have no subscriptions, the
   TNode cleanup only cleanss the last node for now.  We should
   autoprune further up by placing more TNodes and pruning them off.
-  Adding concurrency Sets and Lists to CNode, because those ARE edited
   and read in parallel in our use-case.  Before a CNode is CAS
   replaced, more than 1 thread may be attempting to modify and read the
   subscriptions and children CNode datastructures, and I hit this
   during testing.
-  Fixed an issue where we unsubscribe all sub-topics if an unsubscribe
   is sent on a parent node.
-  Fixed an issue with unsubscribing multiple times when no subscrition
   exists, we should handle this gracefully.
2017-10-24 09:45:12 -07:00
andsel f7b213a677 Added tracking of closed session time and expired session cleaner for clients that never reconnects but had clean session flag = false 2017-10-20 11:48:34 +02:00
andsel 1b272e5849 Big refactory on session management:
- introduced a unique point of access and management of sessions state (SessionRepository)
- separated behaiour for sessions with clean flag to false into DurableSession
- separated behaviour for session with clean flag to true into TransientSession
2017-10-14 17:37:26 +02:00
Andreas Mager 4d59a54ad0 ServerIntegrationSSLTest: System properties saved
ServerLowlevelMessagesIntegrationTests: timeouts raised

osgi: log4j.properties added
MoquetteOsgiTest: test imporved

storage packages will checked too
The state must be active
osgi: README added for development
log4j: fixed
broker/pom.xml: dependencie added osgi config added
osgi_test/pom: dependencies added

MoquetteOsgiTest: test fixed
2017-08-23 21:47:09 +02:00
Andrea Selva ed87abaaaa Merge pull request #340 from nMoncho/ACL_COMMENTS
#310 - Allow for topic/patterns with '#' and end of line comments
2017-08-23 10:02:29 +02:00
Gustavo De Micheli 89174178c6 #310 - Allow for topic/patterns with '#' and end of line comments 2017-08-23 09:43:51 +02:00
andsel d7023ae81b Extracted common subscriptions directory interface and switched to CTrie inspired implementation 2017-07-29 17:10:01 +02:00
andsel 23b903e2f2 - moved and cleaned many part of Paho integration tests to unit tests
- fixed bug that on conflicting connect close old channel but not dropped from ConnectionDescriptors cache
2017-06-29 17:00:14 +02:00
andsel 03c4874a50 Moved tests from integration to unit and extracted and simplified common test part in ProtocolProcessor unit test 2017-06-29 16:59:56 +02:00
andsel ae9c6c7a48 Minor, marked bugsnag ChannelHandler to @Sharable 2017-06-25 12:33:10 +02:00
andsel ec951738b5 Added BugSnag error tracker 2017-06-20 22:12:42 +02:00
andsel 53ec8e5b60 Removed the constraint on client queues to be BlockingQueue but simple Queue 2017-06-20 21:55:59 +02:00
Andreas Mager fb9765304c Java Version set to 1.8
anonymous types replaced by lambda's
Method references used instead of Lambda's
Explicit type replaced by <>
travis.yml updated to java 1.8
2017-06-19 17:07:05 +02:00
andsel 16a9a0ccd0 Fixed runtime loading of persistence implementation 2017-06-18 11:01:25 +02:00
andsel 949e531448 Switched to Netty 4.1.12 to use MqttMessageBuilders 2017-06-10 16:55:00 +02:00
Andreas Mager fcb7870a38 MemorySessionStore: Session class added
MemorySessionStore$Session: clientSession field added
MemorySessionStore#pendingAck: secondPhaseStore & inflightStore &
inboundFlightMeessageToGuid added

ClientSession#cleanup missed these messages
SubscriptionsDirectoryTest: fixed
SessionsStore#dropInFlightMessagesInSession: changed to cleanSession
2017-06-02 18:09:23 +02:00
andsel d9ff81131c Merged topic subscription search and publish into single MessagePublisher method
First step on implementing H2 storage

Minor, fixed not imported class

Cleaned MessageStore interface to avoid duplication of methods used in couple. Switched from guid + message to move messages

Separated ISubscriptionsStore from ISessionStore

Implemented H2 queue
2017-06-02 10:13:34 +02:00
Andreas Mager 9221a87812 editorconfig: max line length set
max line length warnings removed
missing Copyright added
useless publics removed
unmaintainable Javadoc tags: @author removed
helper class warnings removed
field default value initialization removed
Multiple warnings removed
pref: checkstyle warnings removed
Checkstyle will fail the build process if it detects violations
switch default cases error logger added
2017-04-13 22:16:57 +02:00
andsel 6dc762f47f Introduced the FlightZone concept (inbound and outbound) and separated logic of storage system. 2017-04-09 19:22:50 +02:00
andsel 5c6889fbd5 Separated persistence layer, created submodule for MapDB persistence letting the broker use the in-memory message store 2017-04-01 16:21:34 +02:00
andsel 7ffb8fb43b Minor, just layout 2017-03-25 15:40:33 +01:00
andsel 9440352e56 Minor, fixes the output of mapdb data into targetdir (solves #288) 2017-03-25 15:38:10 +01:00
Andreas Mager dd106434ce broker/Server: ScheduledExecutorService moved from MapDBPersistentStore
broker/ProtocolProcessorBootstrapper: tabs removed
broker/MapDBPersistentStore: bonding to Server removed
2017-03-22 23:16:14 +01:00
Andreas Mager 63d2f2dd69 broker/MapDBPersistentStore: Interfaces used for the Constructors
broker/IStore: Interface added for MapDBPersistentStore
broker/ProtocolProcessorBootstrapper: class loader for store added
broker/ISessionsStore#mapToGuid: moved to IMessagesStore
broker/ProtocolProcessorBootstrapper: getter used for SessionStore
broker/Server: getter for processor added
broker/ProtocolProcessor: getter added for Stores
2017-03-20 13:04:14 +01:00
andsel ec6ec09cee Minor fixed comment (#281) 2017-03-19 22:01:23 +01:00
andsel e5c46e7a55 Purge nodes without subscriptions as described by PR #274 2017-03-05 12:37:18 +01:00
Andreas Mager a2e51b2c31 broker/Topic: class added
broker/Topic: String Topics replaced by Topic class
broker/Topic#parseTopic: access set to private
broker/SubscriptionsStoreTest: topic tests moved to own class
broker/TopicTest: containsExactly used
broker/TopicTest: TopicAssert class added
broker/TopicTest$TopicAssert#containsToken: method added
broker/TopicTest$TopicAssert#matches: method added
2017-02-19 18:29:37 +01:00
Andreas Mager ab282cea23 broker/RawClient: code formatter used 2017-02-01 17:13:44 +01:00
Andreas Mager 324721e155 broker/ClientNettyMQTTHandler: code formatter used 2017-02-01 17:13:43 +01:00
Andreas Mager 42dca4a42e broker/Client: code formatter used 2017-02-01 17:13:43 +01:00
Andreas Mager e42e1257c9 broker/MemorySessionStore: code formatter used 2017-02-01 17:13:43 +01:00
Andreas Mager 2b9a21d475 broker/MapDBPersistentStoreTest: code formatter used 2017-02-01 17:13:43 +01:00
Andreas Mager 9e6cfe4002 broker/SubscriptionsStoreTest: code formatter used 2017-02-01 17:13:43 +01:00
Andreas Mager 3351b92ea6 broker/FileAuthenticatorTest: code formatter used 2017-02-01 17:13:43 +01:00
Andreas Mager a946357ea3 broker/DBAuthenticatorTest: code formatter used 2017-02-01 17:13:43 +01:00
Andreas Mager f4120433d9 broker/AuthorizationsCollectorTest: code formatter used 2017-02-01 17:13:43 +01:00
Andreas Mager 25f9bdd9b6 broker/ACLFileParserTest: code formatter used 2017-02-01 17:13:43 +01:00
Andreas Mager a0a758949e broker/ProtocolProcessorTest: code formatter used 2017-02-01 17:13:43 +01:00
Andreas Mager 5125132f23 broker/ProtocolProcessor_CONNECT_Test: code formatter used 2017-02-01 17:13:43 +01:00
Andreas Mager 5206cc3df7 broker/NettyChannelAssertions: code formatter used 2017-02-01 17:13:43 +01:00
Andreas Mager 65faa69852 broker/MockReceiverChannel: code formatter used 2017-02-01 17:13:43 +01:00
Andreas Mager 83dc0f99b6 broker/MockAuthenticator: code formatter used 2017-02-01 17:13:43 +01:00
Andreas Mager edc2515caa broker/MemoryStorageService: code formatter used 2017-02-01 17:13:43 +01:00
Andreas Mager be8a2f4ca4 broker/MemoryMessagesStore: code formatter used 2017-02-01 17:13:42 +01:00
Andreas Mager 0bf059afcf broker/BrokerInterceptorTest: code formatter used 2017-02-01 17:13:42 +01:00
Andreas Mager 47c76fafc1 broker/ClientSessionTest: code formatter used 2017-02-01 17:13:42 +01:00
Andreas Mager 3ebb9c7d48 broker/ConnectionIT: code formatter used 2017-02-01 17:13:42 +01:00
Andreas Mager e68c5ce4b0 broker/ConfigurationParserTest: code formatter used 2017-02-01 17:13:42 +01:00