delivering the opinion of the court.
This is an action on the case for the recovery of damages, alleged to have been sustained by the plaintiff by reason of the failure of the defendant company to sell and deliver ready-mixed mortar of the quality suitable for use in the erection and construction of a certain building.
*568The plaintiff’s amended declaration contains three counts, and the sixth, seventh and eight pleas, filed by the defendant, are directed to the said three counts respectively.
The plaintiff has demurred to the pleas, and our present consideration is on the demurrer.
The averments in each of the counts are, in substance, that the said ready-mixed mortar was purchased by the plaintiff, at the special instance and request of the defendant company, for the building of a certain garage, known to the defendant company, and was paid for by the plaintiff; that it was not of suitable quality for the use for which it was purchased and used, but on the contrary was unsuitable for said purpose, whereby it became and was of no use or value to the plaintiff, and he has thereby been put to great expense, in and about the building of said garage, and has expended large sums of money, in and about the purchase of stone, bricks, and other materials, and in the service and employment of laborers, mechanics and other persons, in and about the construction and erection of said garage and for other purposes incurred in and about the same; and that by reason of the premises great damage has resulted to him, the plaintiff.
Each of the defendant’s pleas, in bar of the action, aver that the plaintiff is estopped from alleging as he does in his several counts, for the reason, it is alleged in substance, that prior to bringing the present action, the defendant herein brought an action against the plaintiff herein before a justice of the peace for the balance of the price of the mortar mentioned in the three counts of the plaintiff’s amended declaration; that the said defendant in that action appeared and defended against a recovery for the price on the ground that the said mortar was not suitable for the purpose for which it was bought, and produced testimony to show that it was unsuitable for said purpose and was of no value to him; and that such being his defense, judgment was rendered against him by the justice in favor of the plaintiff in that action for the amount of its demand, which said judgment was not appealed from and has not been reversed, and which the defendant therein has since paid, and satisfaction has been entered on the record thereof. The record of the justice of the peace is set forth in *569each of said pleas, and it does not show that the defendant therein (the present plaintiff) brought forward any account, demand, or cause of action, and pleaded it as a set-off, and that an entry thereof was made by the justice as required by Section 8, Chap. 99, Revised Code (1893) 744 (14 Del. Laws, c 93). There is in each of said pleas the simple averment, dehors the record, that the defendant in said action (the present plaintiff) appeared and defended the said action in the manner as alleged in said pleas.
The question for our determination is whether the said judgment recovered before the justice of the peace by the present defendant in the action brought by it against the present plaintiff to recover the balance of the purchase price of the said mortar, is a bar to the present action for the reason alleged in said pleas.
Contention was made by counsel for the defendant, in this action, that whether the defense set up by the defendant, in the action before the justice of the peace, is to be considered as a counterclaim in the nature of recoupment, or for unliquidated damages arising out of the alleged failure to deliver suitable mixed mortar for said building purpose, or strictly as a defense in bar to said action, it was an issue before and within the jurisdiction of the justice, passed upon and determined by him, and that his judgment is final and conclusive upon said issue. And it was insisted that the mere fact that the damages claimed by the defendant in said action were unliquidated did not take the issue of fact presented out of the jurisdiction of the justice of the peace, citing Gruell v. Clark, 4 Penn. 321, 54 Atl. 955; Barr v. Logan, 5 Harr. 52; Cannon v. Matthews, 3 Houst. 97; Spahn v. Willman, 1 Penn. 125, 39 Atl. 787, and Colesberry v. Stoops, 1 Harr. 448. And it was further contended that in an action upon a contract for the sale of goods, the defendant may show, in bar of the action, that the consideration had failed by proving that the goods in question were of no value, citing Bye v. McCaulley & Son Co., 7 Penn. 115, 76 Atl. 621; Armstrong v. Columbia Wagon Co., 6 Penn. 274-278, 66 Atl. 366; Leonard & Co. v. Johnson Forge Co., 3 Penn. 104-108, 50 Atl. 541, affirmed in 3 Penn. 344, 51 Atl. 305, 94 Am. St. Rep. 86, 57 L. R. A. 225; Hall v. Cannon, 4 Harr. 360-362, and Davis v. Bonnewell, 1 Houst. 460.
*570[1] This court has said that, within his statutory jurisdiction, the authority of a justice of the peace is just as complete for all purposes of hearing such cases, determining or deciding them, and making up his record, as is the authority of this court. Johnson v. State, 6 Penn. 450, 67 Atl. 785.
[2] There is no doubt that in actions before and within the jurisdiction of a justice of the peace, when matters of account, demand, or cause of action, cognizable before the justice, are brought forward and pleaded as a set-off, and entered by the justice upon his docket as required by the statute, his judgment is conclusive and will bar another action based on such matters, unless the judgment be reversed.
[3] It has been held by this court that as well in actions for the nonpayment of the price of goods sold and delivered under a contract, as in actions for goods sold and delivered with warranty, or in actions for the price of work and labor done under a contract, the defendant may, at his election, either avail himself of any breach of the contract by the plaintiff causing damage to him, in reduction of the damage claimed and sustained from any breach of it by the plaintiff, or he may sue the plaintiff for the same independently, and the former suit and recovery against him shall be no bar to the latter, unless in the former suit he availed himself of his right and privilege to prove and claim the amount of such damage in reduction of the amount of damages demanded by the plaintiff in it from him. Tomlinson & Co. v. Quigley, 5 Houst. 168.
[4] The cause of action declared upon by the plaintiff in this action, all the essential averments in the declaration being considered as a whole, clearly embraces matters of damage not cognizable before a justice of the peace. There is included in the declaration not only the element of damage arising from the alleged uselessness of the mortar, but the further element of damage in consequence of the use of said mortar. Damages purely consequential in character are not matters within the jurisdiction of a justice of the peace. In the present case, the alleged consequential damages are of necessity based upon the alleged inferiority or uselessness of the said mortar. And while in the action before the justice for the recovery of the price of the mortar, the defendant therein was *571not bound to exercise his privilege of defending said action on the ground that the mortar was worthless and of no value to him, and especially so in view of the consequential damages which he alleges he has sustained by reason of using the mortar, yet it appears from the pleadings in the present action that he did so defend the said action before the justice of the peace.
[5] Recoupment is limited in its application as a defense to defeating the plaintiff’s action in whole, or in part, and no recovery can be had for any balance or excess. Recoupment of matters of damage growing out of the same transaction and for which a separate action could be maintained, is allowable by way of defense, after notice, at the election of the defendant, instead of compelling him to resort to a cross action for such damages. Whenever a defendant has a claim for such damages, he may, at his election, exercise his privilege to recoup. He is not compelled to do so, and if he does, he cannot subsequently maintain an action for such damages, or any part thereof.
[6] A proceeding as by notice of recoupment before a justice of the peace is perhaps unknown here, and we know of no machinery whatever for such a proceeding before a justice of the peace. The statute to which we have referred requires that “in every action before a justice of the peace within his jurisdiction, it shall be incumbent on the defendant, if he has against the plaintiff any account, demand, or cause of action, cognizable before a justice of the peace, to bring it forward and plead it as a set-off; and the justice shall enter on his docket the nature and amount of such counter-claim,” etc. A defendant failing to do so is forever barred by the statute from recovering the same. It seems apparent that matters of damage in the nature of recoupment, or defenses, cognizable before a justice of the peace, which the defendant, in actions before a justice of the peace, may, or may not, at his election, rely upon in defense of the whole or a part of the action against him, are not matters within the contemplation of the statute requiring them to be brought forward and formally pleaded as a set-off.
[7] It appears from the pleas filed in this action that the defendant in the action before the justice, who is the plaintiff here, both alleged and produced testimony to support his allegation *572that the said mortar was not suitable for the purpose for which he purchased it, and that it was of no value to him. Although such averment is dehors the record of the justice, the demurrer admits the fact pleaded. In the action for the price of the mortar, we think it was competent for the defendant therein in defense of the action, or in reduction of the plaintiff’s demand, to avail himself of the privilege of showing that the mortar was not suitable for the purpose for which he bought it, and that it was of no value to him. The quality of the mortar is an essential and traversable fact in the present case, and if it was put in issue by the defendant in the action before the justice of the peace, as alleged in said pleas, which must now be taken as admitted on the record, we think it was not a set-off, in contemplation of the statute, which of necessity had to be brought forward and pleaded, and an entry thereof made on the justice’s docket as required by the statute; but it was a matter going to the consideration or value of the mortar which it was competent for the defendant to show in defense of the action, or in reduction of damages claimed by the plaintiff therein, and which, being made an issue, it was competent for the justice to both hear and determine. Although the present action is different from that before the justice, it is nevertheless between the same parties and necessarily based on the alleged inferior quality of said mortar. The present action cannot be maintained without showing that the said mortar was in fact unsuitable for the purpose for which it was bought and used, which issue of fact was before the justice in the action for the recovery of the price of the mortar.
[8] The rule is general that a former judgment on the merits, between the same parties, in a court of competent jurisdiction, is conclusive and final as to any issue actually litigated and determined in the fortiaer actions, however erroneous, and which issue is essential to the maintenance of a second action between them, though it be brought upon a different cause of action. Worknot v. Millen’s Adm’r, 1 Harr. 139; Cromwell v. County of Sac, 94 U. S. 351, 24 L. Ed. 195; Sawyer v. Woodbury, 7 Gray (Mass.) 499, 66 Am. Dec. 518; Betts v. Starr, 5 Conn. 550, 13 Am. Dec. 94; Harrison v. Remington Paper Co., 140 Fed. 385-400, 72 C. C A. *573405, 3 L. R. A. (N. S.) 954, 5 Ann. Cas. 314; Howell v. Goodrich, 69 Ill. 556; O’Connor v. Varney, 10 Gray (Mass.) 231; Merriam v. Woodcock et al., 104 Mass. 326; 23 Cyc. 1216, 1288; Herman on Estoppel, 214, 237; Bigelow on Estoppel, 152.
[9] The plaintiff in this action, having availed himself of his right and privilege to show before the justice that the mortar was unsuitable for the purpose for which he bought it, and being obliged in his present action to rely on the same alleged fact, considered and adjudicated by the said justice of the peace in the former action, we think he cannot now controvert said fact, and that he is barred and estopped from showing any defects in the said mortar and from maintaining his present action.
The demurrer is overruled. Judgment of respondeat ouster is entered upon the election of the plaintiff.