Commit Graph

67 Commits (6a59e92db8b0076ab504837d57ea1779cec377f7)

Author SHA1 Message Date
Roger A. Light 6a59e92db8 Set remaining message expiry interval when republishing. 7 years ago
Roger A. Light 326292681a Add maximum-qos support to broker and client.
This comes in the form of:

* Per listener maximum_qos option, which can be in the range 0-2.
* Changes to mosquitto_publish*() to return MOSQ_ERR_QOS_NOT_SUPPORTED
  if attempting to publish with a higher QoS than supported.
* Bridges will downgrade messages to match the maximum QoS.

More tests on the broker side (specifically bridges) are required. This
needs bridge support for MQTT 5 first.
7 years ago
Roger Light 84660e1cbe Send maximum limits for QoS>0.
This needs more work on the broker front to simplify the design.
7 years ago
Roger A. Light 16e83bfe5d Process receive maximum (as max_inflight_messages). 7 years ago
Roger A. Light 7c3666d593 Subscription identifier support. 7 years ago
Roger Light 9560c5bac7 Add retain_available support. 7 years ago
Roger A. Light f77c1ca91b private struct mqtt5__property -> public mosquitto_property. 7 years ago
Roger A. Light 80f526a5e5 Message Expiry Interval support. 7 years ago
Roger A. Light 9eebcf6704 Rename property__free_all->mosquitto_property_free_all
Make public function.
7 years ago
Roger A. Light 267178bd99 User properties are copied from PUBLISH to PUBLISH. 7 years ago
Roger A. Light 88765a5e80 Consistent use of config.h across the project. 7 years ago
Roger A. Light 0a4810286b Check for 918 7 years ago
Tatsuzo Osawa cb56a75bbb Fix subs memory issue #505
Signed-off-by: Tatsuzo Osawa <tatsuzo.osawa@gmail.com>
7 years ago
Roger A. Light f4d238be18 Bump copyright years. 8 years ago
Roger A. Light ff55499725 Fix persistence reloading. 8 years ago
Roger A. Light a71bee494f HASH_DELETE needs to modify subhier. 9 years ago
Karl Palsson 2dec0ed895 broker: fix queue_qos0_messages behaviour
Prior, offline qos0 clients had an unlimited queue depth when
queue_qos0_messages was true.

Signed-off-by: Karl Palsson <karlp@etactica.com>
9 years ago
Karl Palsson c6aac741c2 broker: support byte based queueing
Limiting queued message depth purely based on message count is hard to
control for memory constrained devices.  The size of messages can vary
wildly, from a few bytes, to a few kilobytes.  Support a new
max_queued_bytes option, and drop packets when the first limit is
reached.  Option defaults to 0 (disabled) by default.
Support also a max_inflight_bytes variable, with similar behaviour.

Fixes (partof) https://github.com/eclipse/mosquitto/issues/100

This pulls up some helper routines for calculating whether to allow
inflight or queuing, resolving some inconsistences in connection
resumption.

Signed-off-by: Karl Palsson <karlp@etactica.com>
9 years ago
Karl Palsson 8268e6da08 database: drop unnecessary local variable
No need to maintain count and context->msg_count separately.

Signed-off-by: Karl Palsson <karlp@etactica.com>
9 years ago
Karl Palsson 30c96f4a1c broker: track stored messages in bytes as well as count
Instead of simply tracking the count of stored messages, keep track of
the total byte size of stored messages.  While only informational at
this point, it provides the basis for byte based limits in the future.

Signed-off-by: Karl Palsson <karlp@etactica.com>
9 years ago
Roger A. Light 883af8af53 Better subtree searching. 9 years ago
Roger A. Light 017db6706f Rename mosquitto_broker.h -> mosquitto_broker_internal.h 9 years ago
Roger A. Light 8378fe44cf Update copyrights. 9 years ago
Roger A. Light 1c3988a397 Merge branch 'master' into develop 9 years ago
Roger A. Light afc2c9951c [57] File missed from previous commit.
Bug: https://github.com/eclipse/mosquitto/issues/57
10 years ago
Pierre Fersing 18cc0f5fc7 Fix bugs introduced by previous commit
Signed-off-by: Pierre Fersing <pierre.fersing@bleemeo.com>
10 years ago
Pierre Fersing 44f23252a0 Improve performance with lots of queued message
Split message queue in two queues: in-flight and queued to avoid the
need to iterate over all messages.

Signed-off-by: Pierre Fersing <pierre.fersing@bleemeo.com>
10 years ago
Roger A. Light 37dceb38f9 Fix some defects discovered by coverity. 10 years ago
Roger A. Light b4fbe904d4 Remove more unnecessary "if(x) mosquitto__free(x)" checks. 10 years ago
Roger Light e2324ff9bb Merge remote-tracking branch 'remotes/origin/master' into develop
Conflicts:
	CMakeLists.txt
	ChangeLog.txt
	THANKS.txt
	appveyor.yml
	config.mk
	installer/mosquitto-cygwin.nsi
	installer/mosquitto.nsi
	lib/messages_mosq.c
	lib/messages_mosq.h
	lib/mosquitto.c
	lib/mosquitto.h
	lib/net_mosq.c
	lib/net_mosq.h
	lib/send_client_mosq.c
	lib/send_mosq.c
	lib/socks_mosq.c
	lib/will_mosq.c
	src/bridge.c
	src/conf.c
	src/context.c
	src/database.c
	src/loop.c
	src/mosquitto.c
	src/mosquitto_broker.h
	src/net.c
	src/read_handle.c
	src/read_handle_server.c
	src/subs.c
10 years ago
Roger A. Light 3f86d316d8 Allow mosquitto__free(NULL).
Remove all unnecessary "if(X)" before a call to mosquitto__free.
10 years ago
Roger A. Light ab7f212b7e [468987] Free unused topic elements.
Reduces memory usage and CPU usage.

Thanks to Guido Hinderberger, Martin Rauscher and Michael Hekel.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=468987
10 years ago
Roger A. Light e49e398eb3 Fix handling of outgoing QoS>0 messages for bridges.
Fix handling of outgoing QoS>0 messages for bridges that could not be
sent because the bridge connection was down.
10 years ago
Roger A. Light 6f193de3a5 [470258] Don't make unnecessary copies of payload in db__messages_store.
Along with the previous commit this closes #470258.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=470258
10 years ago
Roger A. Light 9bccd31b36 Don't make unnecessary copies of topic in db__messages_store. 10 years ago
Roger A. Light cdbe62c2bb Outgoing messages with QoS>0 are no longer retried after a timeout.
This change in behaviour can be justified by considering when the
timeout may have occurred.

* If a connection is unreliable and has dropped, but without one end
  noticing, the messages will be retried on reconnection. Sending
  additional PUBLISH or PUBREL would not have changed anything.

* If a client is overloaded/unable to respond/has a slow connection then
  sending additional PUBLISH or PUBREL would not help the client catch
  up. Once the backlog has cleared the client will respond. If it is not
  able to catch up, sending additional duplicates would not help either.
11 years ago
Roger A. Light 4195fde70b Last raft of renames for the moment. 11 years ago
Roger A. Light 21946ace6c mosquitto__log_printf -> log__printf 11 years ago
Roger A. Light b67c90ec02 Rename internal datatypes. 11 years ago
Roger A. Light 94ef6ec7bb Big set of function renames. 11 years ago
Roger A. Light 8049c4b7f8 Simplify code around SYS statistics gathering. 11 years ago
Roger A. Light b598aec385 Sys -> user includes. 11 years ago
Roger A. Light ec2fcce43b Don't send websockets messages if the message is queued. 11 years ago
Roger A. Light 11756d24c8 Change internal funcs _foo_bar() to foo__bar(). 11 years ago
Roger A. Light 90dc6d8c4c Don't use uhpa for whole topics, unlikely to be of benefit. 11 years ago
Roger A. Light 0ddd438161 Helper macros. 11 years ago
Roger A. Light 2da74ad043 Use uhpa for topics. 11 years ago
Roger A. Light 2ecee163ef Use uhpa for payloads. 11 years ago
Roger A. Light 45b8220a82 [458690] Fix build for WITH_BRIDGE=no
Thanks to Alexandre Zia.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=458690
11 years ago
Roger A. Light 34176359c9 [452913] Prevent dereferencing of NULL string.
Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=452913
11 years ago