2 Upon the failure of defendant’s guaranty, plaintiff had the election of.two remedies: He could either pay for and retain the plant and sue for damages, or rescind the contract by the return of the plant, and demand the portion of the purchase price previously paid. According to the petition, he pursued the latter course; and it must-be conceded, for the purposes of the case, that there was a failure to comply with the terms of the agreement, and, owing to this, a timely tender of the return of the apparatus to defendant. A good cause of action for the $315 paid then was stated. And the same facts furnished an equally good defense to the action by defendant in the justice court, and on appeal in the district court, for the portion of the purchase price ($75) which had not yet been paid. On what theory can it be said that, because these *16facts have been successfully pleaded in defense of a claim asserted by defendant, they may not furnish the basis of an action for recovery by the plaintiff? The latter could not have pleaded his cause of action by way of counterclaim, as it exceeded in amount the jurisdiction of the justice. Section 4477, Code. Nor was he bound to do so. Section 3440 Code. Is he without a remedy? It is well settled 1hat a set-off or counterclaim may or may not he pleaded, as the defendant shall elect; and, unless it is pleaded, the right to sue upon it is an independent cause of action, or to rely upon it in defense of another action by the same plaintiff, is in no wise affected or impaired by a judgment for or against the defendant. In other words, if the matter of set-off or counterclaim is presented and passed upon in a suit, it is barred by the judgment; if not, the defendant may make it the subject of a separate and distinct action. Hunt v. Brown, 146 Mass. 253 (15 N. E. Rep. 587); Roach v. Privett, 90 Ala. 391 (7 South. Rep. 808); Minnaugh v. Partlin, 67 Mich. 391 (34 N. W. Rep. 717). See Enc. Pl. & Prac. 731, and cases collected. The statutes in some states require an existing claim held by the defendant in an action to be pleaded as a counterclaim, while in others, in apparent exception to the above rule, a judgment on a cause of action is treated as a bar to a subsequent suit on a claim involving the same right, which had been available as a defense in the former action. The best-reasoned case on this latter proposition, based on the notion that the right has once been adjudicated, is Bellinger v. Craigue, 31 Barb. (N. Y.) 534. This court, however, took the opposite view in Fairfield v. McNany, 37 Iowa, 75; and, indeed, as there said, the matter is disposed of by our statute, which provides that a “judgment does not prevent the recovery of any claim, though such claim might have been used by way of a set-off, counterclaim or cross demand in the action in which judgment was recovered.” Section 3440, Code.
*173*16But it is said that the actions ought to have been consolidated in the district court, as permitted by section 3644 *17of the Code. It is a sufficient answer to this to say that they were not. Consolidation is effected on an order of court alone, upon application of a party or by agreement. Even when applied for, the order is discretionary, and will be interfered with only upon a clear showing of abuse. See 4 Enc. Pl. & Prac. 684, et seq., where the cases so holding- are collected. This being true, it needs no argument to show that a remedy will not be lost in the one ease by failure to move its consolidation with the other. Besides the judgment of the justice, had no appeal been taken, would have been precisely as effectual as a plea in bar as that ■of the district court in the same case. Had the pendency of the action before the justice been pleaded in abatement in this suit, the plea would have been bad, for that afforded no remedy to plaintiff. Pratt v. Howard, 110 Iowa, 533. Is the judgment when rendered therein any more effectual when pleaded in bar ? We discover no tenable ground for the order overruling the demurrer, and it is reversed.