Modified the Receiver code to perform clean shutdown during failure (onStop). Also committing ZK offset as soon the data written to Spark Store.